From f7c756c214b0b10baebdb02af25b983438dcda83 Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 29 Apr 2019 05:53:25 -0400 Subject: unidasm: Allow hexadecimal values for -skip with 0x prefix --- src/tools/unidasm.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp index c668fcba82d..c437b260c8d 100644 --- a/src/tools/unidasm.cpp +++ b/src/tools/unidasm.cpp @@ -975,7 +975,12 @@ static int parse_options(int argc, char *argv[], options *opts) // skip bytes else if(pending_skip) { - if(sscanf(curarg, "%d", &opts->skip) != 1) + int result; + if(curarg[0] == '0' && curarg[1] == 'x') + result = sscanf(&curarg[2], "%x", &opts->skip); + else + result = sscanf(curarg, "%d", &opts->skip); + if(result != 1) goto usage; pending_skip = false; } -- cgit v1.2.3