aboutsummaryrefslogtreecommitdiff
path: root/lparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'lparser.c')
-rw-r--r--lparser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lparser.c b/lparser.c
index bad3592a..c134b7a8 100644
--- a/lparser.c
+++ b/lparser.c
@@ -542,13 +542,13 @@ static void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) {
542 542
543/* 543/*
544** Generates an error that a goto jumps into the scope of some 544** Generates an error that a goto jumps into the scope of some
545** local variable. 545** variable declaration.
546*/ 546*/
547static l_noret jumpscopeerror (LexState *ls, Labeldesc *gt) { 547static l_noret jumpscopeerror (LexState *ls, Labeldesc *gt) {
548 TString *tsname = getlocalvardesc(ls->fs, gt->nactvar)->vd.name; 548 TString *tsname = getlocalvardesc(ls->fs, gt->nactvar)->vd.name;
549 const char *varname = getstr(tsname); 549 const char *varname = (tsname != NULL) ? getstr(tsname) : "*";
550 luaK_semerror(ls, 550 luaK_semerror(ls,
551 "<goto %s> at line %d jumps into the scope of local '%s'", 551 "<goto %s> at line %d jumps into the scope of '%s'",
552 getstr(gt->name), gt->line, varname); /* raise the error */ 552 getstr(gt->name), gt->line, varname); /* raise the error */
553} 553}
554 554