Skip to content

Commit

Permalink
pop when lua_getinfo error
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwu committed Jul 5, 2018
1 parent 079a5fb commit 1733190
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion remotedebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,11 @@ lclient_activeline(lua_State *L) {
lua_Debug ar;
if (lua_getstack(hL, 1, &ar) == 0)
return 0;
if (lua_getinfo(hL, "SL", &ar) == 0)
if (lua_getinfo(hL, "SL", &ar) == 0) {
// pop Line table when error
lua_pop(hL, 1);
return 0;
}

if (line < ar.linedefined)
line = ar.linedefined;
Expand Down

0 comments on commit 1733190

Please sign in to comment.