mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
lua bugfix
This commit is contained in:
@@ -653,6 +653,7 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
|
|||||||
CallInfo *ci = L->ci;
|
CallInfo *ci = L->ci;
|
||||||
const char *msg;
|
const char *msg;
|
||||||
va_list argp;
|
va_list argp;
|
||||||
|
luaC_checkGC(L); /* error message uses memory */
|
||||||
va_start(argp, fmt);
|
va_start(argp, fmt);
|
||||||
msg = luaO_pushvfstring(L, fmt, argp); /* format message */
|
msg = luaO_pushvfstring(L, fmt, argp); /* format message */
|
||||||
va_end(argp);
|
va_end(argp);
|
||||||
|
|||||||
@@ -1395,7 +1395,7 @@ static void test_then_block (LexState *ls, int *escapelist) {
|
|||||||
luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */
|
luaK_goiffalse(ls->fs, &v); /* will jump to label if condition is true */
|
||||||
enterblock(fs, &bl, 0); /* must enter block before 'goto' */
|
enterblock(fs, &bl, 0); /* must enter block before 'goto' */
|
||||||
gotostat(ls, v.t); /* handle goto/break */
|
gotostat(ls, v.t); /* handle goto/break */
|
||||||
while (testnext(ls, ';')) {} /* skip colons */
|
while (testnext(ls, ';')) {} /* skip semicolons */
|
||||||
if (block_follow(ls, 0)) { /* 'goto' is the entire block? */
|
if (block_follow(ls, 0)) { /* 'goto' is the entire block? */
|
||||||
leaveblock(fs);
|
leaveblock(fs);
|
||||||
return; /* and that is it */
|
return; /* and that is it */
|
||||||
|
|||||||
Reference in New Issue
Block a user