aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-08-24 13:15:49 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-08-24 13:15:49 -0300
commit98296f6b45208e32a83dcb582b3a37b406289d85 (patch)
tree777b65e4a8a6da1d5f907ec5d4d2e6df5a3e9ae6 /lapi.c
parent23b79c5945023a661754e45c58595f89c84d4800 (diff)
downloadlua-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lapi.c b/lapi.c
index 6efdb505..65812d78 100644
--- a/lapi.c
+++ b/lapi.c
@@ -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;