diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.45 2005/07/06 18:07:30 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.46 2005/07/31 17:12:32 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -344,6 +344,7 @@ LUA_API const char *lua_tolstring (lua_State *L, int idx, size_t *len) { | |||
344 | return NULL; | 344 | return NULL; |
345 | } | 345 | } |
346 | luaC_checkGC(L); | 346 | luaC_checkGC(L); |
347 | o = index2adr(L, idx); /* previous call may reallocate the stack */ | ||
347 | lua_unlock(L); | 348 | lua_unlock(L); |
348 | } | 349 | } |
349 | if (len != NULL) *len = tsvalue(o)->len; | 350 | if (len != NULL) *len = tsvalue(o)->len; |