mirror of
https://github.com/lua/lua
synced 2024-11-25 22:29:39 +03:00
Fixed bug with to-be-closed variables in base C level
To-be-closed variables in C use 'ci.nresults' to code that there is a variable to be closed in that function. The intialization of the base C level (the one "running" when calling API functions outside any Lua call) did not initialize 'ci.nresults', creating (correct) warnings in valgrind.
This commit is contained in:
parent
c65605151c
commit
969b8c1f14
2
lstate.c
2
lstate.c
@ -196,6 +196,8 @@ static void stack_init (lua_State *L1, lua_State *L) {
|
||||
ci->next = ci->previous = NULL;
|
||||
ci->callstatus = CIST_C;
|
||||
ci->func = L1->top;
|
||||
ci->u.c.k = NULL;
|
||||
ci->nresults = 0;
|
||||
setnilvalue(s2v(L1->top)); /* 'function' entry for this 'ci' */
|
||||
L1->top++;
|
||||
ci->top = L1->top + LUA_MINSTACK;
|
||||
|
Loading…
Reference in New Issue
Block a user