mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 15:14:08 +00:00
Add workaround for bytecode dump of builtins.
Reported by Hang Zhou. Thanks to Sergey Kaplun. #1038
This commit is contained in:
parent
91914b23f6
commit
165ea18b0e
@ -189,7 +189,8 @@ static void bcwrite_knum(BCWriteCtx *ctx, GCproto *pt)
|
|||||||
goto save_int;
|
goto save_int;
|
||||||
} else {
|
} else {
|
||||||
/* Write a 33 bit ULEB128 for the int (lsb=0) or loword (lsb=1). */
|
/* Write a 33 bit ULEB128 for the int (lsb=0) or loword (lsb=1). */
|
||||||
if (!LJ_DUALNUM) { /* Narrow number constants to integers. */
|
if (!LJ_DUALNUM && o->u32.hi != LJ_KEYINDEX) {
|
||||||
|
/* Narrow number constants to integers. */
|
||||||
lua_Number num = numV(o);
|
lua_Number num = numV(o);
|
||||||
k = lj_num2int(num);
|
k = lj_num2int(num);
|
||||||
if (num == (lua_Number)k) { /* -0 is never a constant. */
|
if (num == (lua_Number)k) { /* -0 is never a constant. */
|
||||||
|
Loading…
Reference in New Issue
Block a user