detail (message)

This commit is contained in:
Roberto Ierusalimschy 2010-11-09 09:04:15 -02:00
parent 43ec354722
commit 2a966116b1
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
** $Id: lauxlib.c,v 1.223 2010/10/25 20:31:11 roberto Exp roberto $
** $Id: lauxlib.c,v 1.224 2010/10/29 12:52:21 roberto Exp roberto $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@ -377,7 +377,7 @@ LUALIB_API char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz) {
if (newsize - B->n < sz) /* not bit enough? */
newsize = B->n + sz;
if (newsize < B->n || newsize - B->n < sz)
luaL_error(L, "string too large");
luaL_error(L, "buffer too large");
newbuff = (char *)lua_newuserdata(L, newsize); /* create larger buffer */
memcpy(newbuff, B->b, B->n); /* move content to new buffer */
if (buffonstack(B))