Skip to content

Commit e1e3034

Browse files
author
Mike Pall
committed
Fix compiler warning.
1 parent 5ef9e45 commit e1e3034

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib_base.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ LJLIB_ASM(tonumber) LJLIB_REC(.)
301301
while (lj_char_isspace((unsigned char)(*ep))) ep++;
302302
if (*ep == '\0') {
303303
if (LJ_DUALNUM && LJ_LIKELY(ul < 0x80000000u+neg)) {
304-
if (neg) ul = -ul;
304+
if (neg) ul = (unsigned long)-(long)ul;
305305
setintV(L->base-1-LJ_FR2, (int32_t)ul);
306306
} else {
307307
lua_Number n = (lua_Number)ul;

0 commit comments

Comments
 (0)