- 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'
This commit is contained in:
Roberto Ierusalimschy
2019-05-28 15:46:49 -03:00
parent d9f40e3f6f
commit b293ae0577
9 changed files with 46 additions and 23 deletions

View File

@@ -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;
}