diff options
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lcode.c,v 2.96 2014/11/21 12:15:57 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.97 2014/11/24 14:59:22 roberto Exp roberto $ |
3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -761,12 +761,8 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { | |||
761 | ** return false if folding can raise an error | 761 | ** return false if folding can raise an error |
762 | */ | 762 | */ |
763 | static int validop (int op, TValue *v1, TValue *v2) { | 763 | static int validop (int op, TValue *v1, TValue *v2) { |
764 | lua_Number a, b; | ||
765 | lua_Integer i; | 764 | lua_Integer i; |
766 | cast_void(a); cast_void(b); /* macro may not use its arguments */ | 765 | if (luai_numinvalidop(op, nvalue(v1), nvalue(v2))) return 0; |
767 | if (luai_numinvalidop(op, (cast_void(tonumber(v1, &a)), a), | ||
768 | (cast_void(tonumber(v2, &b)), b))) | ||
769 | return 0; | ||
770 | switch (op) { | 766 | switch (op) { |
771 | case LUA_OPBAND: case LUA_OPBOR: case LUA_OPBXOR: | 767 | case LUA_OPBAND: case LUA_OPBOR: case LUA_OPBXOR: |
772 | case LUA_OPSHL: case LUA_OPSHR: case LUA_OPBNOT: /* conversion errors */ | 768 | case LUA_OPSHL: case LUA_OPSHR: case LUA_OPBNOT: /* conversion errors */ |