diff options
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -35,6 +35,7 @@ | |||
35 | #define MAXREGS 255 | 35 | #define MAXREGS 255 |
36 | 36 | ||
37 | 37 | ||
38 | /* (note that expressions VJMP also have jumps.) */ | ||
38 | #define hasjumps(e) ((e)->t != (e)->f) | 39 | #define hasjumps(e) ((e)->t != (e)->f) |
39 | 40 | ||
40 | 41 | ||
@@ -985,7 +986,7 @@ void luaK_exp2anyregup (FuncState *fs, expdesc *e) { | |||
985 | ** or it is a constant. | 986 | ** or it is a constant. |
986 | */ | 987 | */ |
987 | void luaK_exp2val (FuncState *fs, expdesc *e) { | 988 | void luaK_exp2val (FuncState *fs, expdesc *e) { |
988 | if (hasjumps(e)) | 989 | if (e->k == VJMP || hasjumps(e)) |
989 | luaK_exp2anyreg(fs, e); | 990 | luaK_exp2anyreg(fs, e); |
990 | else | 991 | else |
991 | luaK_dischargevars(fs, e); | 992 | luaK_dischargevars(fs, e); |