From 118de2a37e522fa175295f03c0c644652c85a632 Mon Sep 17 00:00:00 2001 From: Igor M Date: Mon, 18 Mar 2024 15:05:58 +0200 Subject: [PATCH] fixed int typ in positive overflow detection --- src/hbas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hbas.c b/src/hbas.c index 1498521..acd3e93 100644 --- a/src/hbas.c +++ b/src/hbas.c @@ -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,