aboutsummaryrefslogtreecommitdiff
path: root/tccasm.c
diff options
context:
space:
mode:
authorbellard <bellard>2003-04-21 15:21:19 +0000
committerbellard <bellard>2003-04-21 15:21:19 +0000
commit0eef235475a86514e3c359a38cbd6aaa8175eea0 (patch)
tree85b0cc4a56c7a00dba525c6e980a44e405422abf /tccasm.c
parent410fc57ba05c4e59534d0dfc8ef64c77b62c2810 (diff)
downloadtinycc-0eef235475a86514e3c359a38cbd6aaa8175eea0.tar.gz
tinycc-0eef235475a86514e3c359a38cbd6aaa8175eea0.tar.bz2
asm number parsing (thanks to Dave Long)
Diffstat (limited to 'tccasm.c')
-rw-r--r--tccasm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tccasm.c b/tccasm.c
index 22f2931..d83cda0 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -40,7 +40,7 @@ static void asm_expr_unary(TCCState *s1, ExprValue *pe)
switch(tok) {
case TOK_PPNUM:
p = tokc.cstr->data;
- n = strtol(p, (char **)&p, 0);
+ n = strtoul(p, (char **)&p, 0);
if (*p == 'b' || *p == 'f') {
/* backward or forward label */
label = asm_get_local_label_name(s1, n);
@@ -413,7 +413,7 @@ static int tcc_assemble_internal(TCCState *s1, int do_preprocess)
const char *p;
int n;
p = tokc.cstr->data;
- n = strtol(p, (char **)&p, 10);
+ n = strtoul(p, (char **)&p, 10);
if (*p != '\0')
expect("':'");
/* new local label */