diff options
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -653,7 +653,7 @@ void luaK_int (FuncState *fs, int reg, lua_Integer i) { | |||
653 | 653 | ||
654 | static void luaK_float (FuncState *fs, int reg, lua_Number f) { | 654 | static void luaK_float (FuncState *fs, int reg, lua_Number f) { |
655 | lua_Integer fi; | 655 | lua_Integer fi; |
656 | if (luaV_flttointeger(f, &fi, 0) && fitsBx(fi)) | 656 | if (luaV_flttointeger(f, &fi, F2Ieq) && fitsBx(fi)) |
657 | luaK_codeAsBx(fs, OP_LOADF, reg, cast_int(fi)); | 657 | luaK_codeAsBx(fs, OP_LOADF, reg, cast_int(fi)); |
658 | else | 658 | else |
659 | luaK_codek(fs, reg, luaK_numberK(fs, f)); | 659 | luaK_codek(fs, reg, luaK_numberK(fs, f)); |
@@ -1220,7 +1220,7 @@ static int isSCnumber (expdesc *e, int *pi, int *isfloat) { | |||
1220 | lua_Integer i; | 1220 | lua_Integer i; |
1221 | if (e->k == VKINT) | 1221 | if (e->k == VKINT) |
1222 | i = e->u.ival; | 1222 | i = e->u.ival; |
1223 | else if (e->k == VKFLT && luaV_flttointeger(e->u.nval, &i, 0)) | 1223 | else if (e->k == VKFLT && luaV_flttointeger(e->u.nval, &i, F2Ieq)) |
1224 | *isfloat = 1; | 1224 | *isfloat = 1; |
1225 | else | 1225 | else |
1226 | return 0; /* not a number */ | 1226 | return 0; /* not a number */ |