diff options
Diffstat (limited to 'lobject.c')
-rw-r--r-- | lobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -419,9 +419,9 @@ typedef struct BuffFS { | |||
419 | static void pushstr (BuffFS *buff, const char *str, size_t l) { | 419 | static void pushstr (BuffFS *buff, const char *str, size_t l) { |
420 | lua_State *L = buff->L; | 420 | lua_State *L = buff->L; |
421 | setsvalue2s(L, L->top, luaS_newlstr(L, str, l)); | 421 | setsvalue2s(L, L->top, luaS_newlstr(L, str, l)); |
422 | L->top++; | 422 | L->top++; /* may use one extra slot */ |
423 | buff->pushed++; | 423 | buff->pushed++; |
424 | if (buff->pushed > 1 && L->top + 2 > L->stack_last) { | 424 | if (buff->pushed > 1 && L->top + 1 >= L->stack_last) { |
425 | luaV_concat(L, buff->pushed); /* join all partial results into one */ | 425 | luaV_concat(L, buff->pushed); /* join all partial results into one */ |
426 | buff->pushed = 1; | 426 | buff->pushed = 1; |
427 | } | 427 | } |