diff options
author | Peter Johnson <peter@tortall.net> | 2015-11-06 02:36:56 -0800 |
---|---|---|
committer | Peter Johnson <peter@tortall.net> | 2015-11-06 02:36:56 -0800 |
commit | 257df7ec47dd3a2ef58541fed6c6ebceb1072f6d (patch) | |
tree | 0d9464b4a094cdcc035db6fc24d3203bef937dd5 | |
parent | 7160679eee91323db98b0974596c7221eeff772c (diff) | |
parent | 32ad9c46cebd5bf07af9c05383d3c16e6cb1f17d (diff) | |
download | yasm-257df7ec47dd3a2ef58541fed6c6ebceb1072f6d.tar.gz |
Merge pull request #72 from Gramner/master
Support numbers prefixed with + or - in %ifnum
-rw-r--r-- | modules/preprocs/nasm/nasm-pp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/preprocs/nasm/nasm-pp.c b/modules/preprocs/nasm/nasm-pp.c index 27a8cc6c..5ea650e3 100644 --- a/modules/preprocs/nasm/nasm-pp.c +++ b/modules/preprocs/nasm/nasm-pp.c @@ -2249,7 +2249,10 @@ if_condition(Token * tline, int i) case PP_ELIFNUM: case PP_IFNNUM: case PP_ELIFNNUM: - j = (t->type == TOK_NUMBER); + while (tok_is_(t, "+") || tok_is_(t, "-") || + tok_type_(t, TOK_WHITESPACE)) + t = t->next; + j = (t && t->type == TOK_NUMBER); break; case PP_IFSTR: case PP_ELIFSTR: |