mirror of
https://github.com/frida/tinycc
synced 2024-11-24 08:39:37 +03:00
asm number parsing (thanks to Dave Long)
This commit is contained in:
parent
410fc57ba0
commit
0eef235475
4
tccasm.c
4
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user