diff options
-rw-r--r-- | lauxlib.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.203 2010/03/17 21:37:37 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.204 2010/03/19 21:04:17 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 | */ |
@@ -397,8 +397,7 @@ LUALIB_API void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l) { | |||
397 | size_t space = bufffree(B); | 397 | size_t space = bufffree(B); |
398 | if (space == 0) { | 398 | if (space == 0) { |
399 | luaL_prepbuffer(B); | 399 | luaL_prepbuffer(B); |
400 | lua_assert(bufffree(B) == LUAL_BUFFERSIZE); | 400 | space = LUAL_BUFFERSIZE; /* bufffree(B) == LUAL_BUFFERSIZE */ |
401 | space = LUAL_BUFFERSIZE; | ||
402 | } | 401 | } |
403 | if (space > l) space = l; | 402 | if (space > l) space = l; |
404 | memcpy(B->p, s, space); | 403 | memcpy(B->p, s, space); |