diff options
-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.244 2012/05/31 20:28:45 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.245 2012/08/16 17:32:20 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 | */ |
@@ -438,7 +438,7 @@ LUALIB_API char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz) { | |||
438 | if (B->size - B->n < sz) { /* not enough space? */ | 438 | if (B->size - B->n < sz) { /* not enough space? */ |
439 | char *newbuff; | 439 | char *newbuff; |
440 | size_t newsize = B->size * 2; /* double buffer size */ | 440 | size_t newsize = B->size * 2; /* double buffer size */ |
441 | if (newsize - B->n < sz) /* not bit enough? */ | 441 | if (newsize - B->n < sz) /* not big enough? */ |
442 | newsize = B->n + sz; | 442 | newsize = B->n + sz; |
443 | if (newsize < B->n || newsize - B->n < sz) | 443 | if (newsize < B->n || newsize - B->n < sz) |
444 | luaL_error(L, "buffer too large"); | 444 | luaL_error(L, "buffer too large"); |