diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-03-11 14:05:06 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-03-11 14:05:06 -0300 |
| commit | 65b07dd53d7938a60112fc4473f5cad3473e3534 (patch) | |
| tree | 469c75dba3b194c494b6ad6a30ca44e7e8354ef5 /ldebug.c | |
| parent | 7237eb3f1c480d6bc7fe2832ddd36f2137fb69d9 (diff) | |
| download | lua-65b07dd53d7938a60112fc4473f5cad3473e3534.tar.gz lua-65b07dd53d7938a60112fc4473f5cad3473e3534.tar.bz2 lua-65b07dd53d7938a60112fc4473f5cad3473e3534.zip | |
API asserts for illegal pops of to-be-closed variables
Diffstat (limited to 'ldebug.c')
| -rw-r--r-- | ldebug.c | 1 |
1 files changed, 1 insertions, 0 deletions
| @@ -245,6 +245,7 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) { | |||
| 245 | lua_lock(L); | 245 | lua_lock(L); |
| 246 | name = luaG_findlocal(L, ar->i_ci, n, &pos); | 246 | name = luaG_findlocal(L, ar->i_ci, n, &pos); |
| 247 | if (name) { | 247 | if (name) { |
| 248 | api_checkpop(L, 1); | ||
| 248 | setobjs2s(L, pos, L->top.p - 1); | 249 | setobjs2s(L, pos, L->top.p - 1); |
| 249 | L->top.p--; /* pop value */ | 250 | L->top.p--; /* pop value */ |
| 250 | } | 251 | } |
