aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-02-17 11:31:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-02-17 11:31:16 -0300
commit189378142a70398ad538af66b62430bc9ea3c645 (patch)
treeff7ac6d47eddc1c5cdd369168c844fbc2dd7d243
parent82749b765e1fa657b7d68c64426428951db066d8 (diff)
downloadlua-189378142a70398ad538af66b62430bc9ea3c645.tar.gz
lua-189378142a70398ad538af66b62430bc9ea3c645.tar.bz2
lua-189378142a70398ad538af66b62430bc9ea3c645.zip
buffer creation ensures buffer space plus MINSTACK in the stack
-rw-r--r--lauxlib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 0e0167e9..55ee1411 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -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
357LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) { 357LUALIB_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;