diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-02-17 11:31:16 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-02-17 11:31:16 -0300 |
commit | 189378142a70398ad538af66b62430bc9ea3c645 (patch) | |
tree | ff7ac6d47eddc1c5cdd369168c844fbc2dd7d243 | |
parent | 82749b765e1fa657b7d68c64426428951db066d8 (diff) | |
download | lua-189378142a70398ad538af66b62430bc9ea3c645.tar.gz lua-189378142a70398ad538af66b62430bc9ea3c645.tar.bz2 lua-189378142a70398ad538af66b62430bc9ea3c645.zip |
buffer creation ensures buffer space plus MINSTACK in the stack
-rw-r--r-- | lauxlib.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.179 2008/07/03 14:21:41 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.180 2009/02/13 19:39:34 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -355,6 +355,7 @@ LUALIB_API void luaL_addvalue (luaL_Buffer *B) { | |||
355 | 355 | ||
356 | 356 | ||
357 | LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) { | 357 | LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) { |
358 | luaL_checkstack(L, LIMIT + LUA_MINSTACK, "no space for new buffer"); | ||
358 | B->L = L; | 359 | B->L = L; |
359 | B->p = B->buffer; | 360 | B->p = B->buffer; |
360 | B->lvl = 0; | 361 | B->lvl = 0; |