summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-11-06 23:04:12 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2010-11-20 14:21:12 +0300
commit5c89aea3d17fe5dabbf886626b1db6c34ee0070a (patch)
treed775256949cdd32f710745f74822d6151363d108
parent0b2c41d0d38e71b5ff4256738fa8708b9aeb5a67 (diff)
downloadnasm-5c89aea3d17fe5dabbf886626b1db6c34ee0070a.tar.gz
eval: rexp3 should operate with 64bit numbers
reloc_value returns 64bit numbers but we strip it down to 'int' which causes problems if the former value is big enough to overflow 'int'. Fix it. [ BR3104312 ] Reported-by: Christian Masloch Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 575824ad..bfbf2819 100644
--- a/eval.c
+++ b/eval.c
@@ -406,7 +406,7 @@ static expr *rexp3(int critical)
TOKEN_GE ? ">=" : ">"));
v = 0; /* must set it to _something_ */
} else {
- int vv = reloc_value(e);
+ int64_t vv = reloc_value(e);
if (vv == 0)
v = (j == TOKEN_LE || j == TOKEN_GE);
else if (vv > 0)