aboutsummaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lcode.c b/lcode.c
index 47e5424e..e7750fff 100644
--- a/lcode.c
+++ b/lcode.c
@@ -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*/
993void luaK_exp2val (FuncState *fs, expdesc *e) { 994void 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);