diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-11-09 09:04:15 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-11-09 09:04:15 -0200 |
commit | 2a966116b1fe33e1ff18ec408b77311599633b52 (patch) | |
tree | 26cd63df32136c5f8a942d29a31c34699c26565c /lauxlib.c | |
parent | 43ec354722183e8a9f14f0c588ea3a63c8c86432 (diff) | |
download | lua-2a966116b1fe33e1ff18ec408b77311599633b52.tar.gz lua-2a966116b1fe33e1ff18ec408b77311599633b52.tar.bz2 lua-2a966116b1fe33e1ff18ec408b77311599633b52.zip |
detail (message)
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.223 2010/10/25 20:31:11 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.224 2010/10/29 12:52:21 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 | */ |
@@ -377,7 +377,7 @@ LUALIB_API char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz) { | |||
377 | if (newsize - B->n < sz) /* not bit enough? */ | 377 | if (newsize - B->n < sz) /* not bit enough? */ |
378 | newsize = B->n + sz; | 378 | newsize = B->n + sz; |
379 | if (newsize < B->n || newsize - B->n < sz) | 379 | if (newsize < B->n || newsize - B->n < sz) |
380 | luaL_error(L, "string too large"); | 380 | luaL_error(L, "buffer too large"); |
381 | newbuff = (char *)lua_newuserdata(L, newsize); /* create larger buffer */ | 381 | newbuff = (char *)lua_newuserdata(L, newsize); /* create larger buffer */ |
382 | memcpy(newbuff, B->b, B->n); /* move content to new buffer */ | 382 | memcpy(newbuff, B->b, B->n); /* move content to new buffer */ |
383 | if (buffonstack(B)) | 383 | if (buffonstack(B)) |