summaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lparser.c b/lparser.c
index 5370145b..69168a16 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.c,v 2.120 2011/09/30 12:44:45 roberto Exp roberto $ 2** $Id: lparser.c,v 2.121 2011/10/24 14:51:44 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -344,9 +344,10 @@ static void closegoto (LexState *ls, int g, Labeldesc *label) {
344 Labeldesc *gt = &gl->arr[g]; 344 Labeldesc *gt = &gl->arr[g];
345 lua_assert(eqstr(gt->name, label->name)); 345 lua_assert(eqstr(gt->name, label->name));
346 if (gt->nactvar < label->nactvar) { 346 if (gt->nactvar < label->nactvar) {
347 TString *vname = getlocvar(fs, gt->nactvar)->varname;
347 const char *msg = luaO_pushfstring(ls->L, 348 const char *msg = luaO_pushfstring(ls->L,
348 "<goto %s> at line %d jumps into the scope of local " LUA_QS, 349 "<goto %s> at line %d jumps into the scope of local " LUA_QS,
349 getstr(gt->name), gt->line, getstr(getlocvar(fs, gt->nactvar)->varname)); 350 getstr(gt->name), gt->line, getstr(vname));
350 semerror(ls, msg); 351 semerror(ls, msg);
351 } 352 }
352 luaK_patchlist(fs, gt->pc, label->pc); 353 luaK_patchlist(fs, gt->pc, label->pc);