diff options
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -31,6 +31,7 @@ | |||
31 | #include "lvm.h" | 31 | #include "lvm.h" |
32 | 32 | ||
33 | 33 | ||
34 | /* (note that expressions VJMP also have jumps.) */ | ||
34 | #define hasjumps(e) ((e)->t != (e)->f) | 35 | #define hasjumps(e) ((e)->t != (e)->f) |
35 | 36 | ||
36 | 37 | ||
@@ -991,7 +992,7 @@ void luaK_exp2anyregup (FuncState *fs, expdesc *e) { | |||
991 | ** or it is a constant. | 992 | ** or it is a constant. |
992 | */ | 993 | */ |
993 | void luaK_exp2val (FuncState *fs, expdesc *e) { | 994 | void luaK_exp2val (FuncState *fs, expdesc *e) { |
994 | if (hasjumps(e)) | 995 | if (e->k == VJMP || hasjumps(e)) |
995 | luaK_exp2anyreg(fs, e); | 996 | luaK_exp2anyreg(fs, e); |
996 | else | 997 | else |
997 | luaK_dischargevars(fs, e); | 998 | luaK_dischargevars(fs, e); |