diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-08-24 13:15:49 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-08-24 13:15:49 -0300 |
commit | 98296f6b45208e32a83dcb582b3a37b406289d85 (patch) | |
tree | 777b65e4a8a6da1d5f907ec5d4d2e6df5a3e9ae6 /lapi.c | |
parent | 23b79c5945023a661754e45c58595f89c84d4800 (diff) | |
download | lua-98296f6b45208e32a83dcb582b3a37b406289d85.tar.gz lua-98296f6b45208e32a83dcb582b3a37b406289d85.tar.bz2 lua-98296f6b45208e32a83dcb582b3a37b406289d85.zip |
some bugs related to stack reallocation
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; |