From b293ae0577bebaca7169cb4f041b800641d5e2c4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 28 May 2019 15:46:49 -0300 Subject: Details - new error message for "attempt to assign to const variable" - note in the manual about compatibility options - comments - small changes in 'read_line' and 'pushstr' --- lobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lobject.c') diff --git a/lobject.c b/lobject.c index ce14059f..979a6889 100644 --- a/lobject.c +++ b/lobject.c @@ -419,9 +419,9 @@ typedef struct BuffFS { static void pushstr (BuffFS *buff, const char *str, size_t l) { lua_State *L = buff->L; setsvalue2s(L, L->top, luaS_newlstr(L, str, l)); - L->top++; + L->top++; /* may use one extra slot */ buff->pushed++; - if (buff->pushed > 1 && L->top + 2 > L->stack_last) { + if (buff->pushed > 1 && L->top + 1 >= L->stack_last) { luaV_concat(L, buff->pushed); /* join all partial results into one */ buff->pushed = 1; } -- cgit v1.2.3-55-g6feb