summaryrefslogtreecommitdiff
path: root/common/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/parse.c')
-rw-r--r--common/parse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/parse.c b/common/parse.c
index 5e3cce7d..b123a6c7 100644
--- a/common/parse.c
+++ b/common/parse.c
@@ -5556,13 +5556,14 @@ int parse_X (cfile, buf, max)
skip_to_semi (cfile);
return 0;
}
- convert_num (cfile, &buf [len], val, 16, 8);
- if (len++ > max) {
+ if (len >= max) {
parse_warn (cfile,
"hexadecimal constant too long.");
skip_to_semi (cfile);
return 0;
}
+ convert_num (cfile, &buf [len], val, 16, 8);
+ len++;
token = peek_token (&val, (unsigned *)0, cfile);
if (token == COLON)
token = next_token (&val,