diff options
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.159 2006/03/21 19:31:09 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.160 2006/06/22 16:12:59 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 | */ |
@@ -411,9 +411,9 @@ static void adjuststack (luaL_Buffer *B) { | |||
411 | if (B->lvl > 1) { | 411 | if (B->lvl > 1) { |
412 | lua_State *L = B->L; | 412 | lua_State *L = B->L; |
413 | int toget = 1; /* number of levels to concat */ | 413 | int toget = 1; /* number of levels to concat */ |
414 | size_t toplen = lua_strlen(L, -1); | 414 | size_t toplen = lua_objlen(L, -1); |
415 | do { | 415 | do { |
416 | size_t l = lua_strlen(L, -(toget+1)); | 416 | size_t l = lua_objlen(L, -(toget+1)); |
417 | if (B->lvl - toget + 1 >= LIMIT || toplen > l) { | 417 | if (B->lvl - toget + 1 >= LIMIT || toplen > l) { |
418 | toplen += l; | 418 | toplen += l; |
419 | toget++; | 419 | toget++; |