From 1afcea1435dc2196d37788b1c04d849d7b39de1f Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Wed, 19 Sep 2012 16:30:46 +0200 Subject: [PATCH] From Lua 5.2: 'break' allowed anywhere. Needs -DLUAJIT_ENABLE_LUA52COMPAT. --- src/lj_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_parse.c b/src/lj_parse.c index 322a542d..d0396a59 100644 --- a/src/lj_parse.c +++ b/src/lj_parse.c @@ -2666,7 +2666,7 @@ static int parse_stmt(LexState *ls) case TK_break: lj_lex_next(ls); parse_break(ls); - return 1; /* Must be last. */ + return !LJ_52; /* Must be last in Lua 5.1. */ #if LJ_52 case ';': lj_lex_next(ls);