]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix compiler warning.
authorMike Pall <mike>
Thu, 25 Jun 2020 13:19:48 +0000 (15:19 +0200)
committerMike Pall <mike>
Thu, 25 Jun 2020 13:19:48 +0000 (15:19 +0200)
src/lib_base.c

index 8c1e98a6d501103bfa41a5d2ea94927e1dce3e7b..eb604538c8d973caa2b54f1b861c309053d89269 100644 (file)
@@ -301,7 +301,7 @@ LJLIB_ASM(tonumber)         LJLIB_REC(.)
        while (lj_char_isspace((unsigned char)(*ep))) ep++;
        if (*ep == '\0') {
          if (LJ_DUALNUM && LJ_LIKELY(ul < 0x80000000u+neg)) {
-           if (neg) ul = -ul;
+           if (neg) ul = (unsigned long)-(long)ul;
            setintV(L->base-1-LJ_FR2, (int32_t)ul);
          } else {
            lua_Number n = (lua_Number)ul;