fixed int typ in positive overflow detection
This commit is contained in:
parent
f556bb56ac
commit
118de2a37e
|
@ -207,7 +207,7 @@ static AsmError assemble_instr(InstHt ht, char *input, size_t len, Token *tok,
|
|||
return ErrBadNumOverflow;
|
||||
}
|
||||
num_to_write = (uint64_t)tmp;
|
||||
} else if (meta.sign == 2 && (int)num_to_write < 0) {
|
||||
} else if (meta.sign == 2 && (int64_t)num_to_write < 0) {
|
||||
return ErrBadNumOverflow;
|
||||
}
|
||||
AsmError err = push_int_le(&rv->buf[rv->len], num_to_write,
|
||||
|
|
Loading…
Reference in a new issue