mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Reset taggroup iterator on successive calls
This commit is contained in:
parent
8dd964e3a7
commit
5d1040c924
1 changed files with 2 additions and 0 deletions
|
@ -75,6 +75,8 @@ struct element_iterator_state {
|
|||
static int element_iterator(lua_State *L)
|
||||
{
|
||||
struct element_iterator_state * state = lua_touserdata(L, 1);
|
||||
if (lua_isnoneornil(L, 3))
|
||||
state->p = 0;
|
||||
lua_pushnumber(L, ++state->p);
|
||||
lua_gettable(L, 1);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue