From ae809e9fd132ab867741a6a777450f9bc0d49be4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 3 Jul 2020 11:54:58 -0300 Subject: 'luaV_concat' can "concat" one single value Several of its callers needed that case and had to do the check themselves. --- lobject.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lobject.c') diff --git a/lobject.c b/lobject.c index 2a28ebd4..223bbd0c 100644 --- a/lobject.c +++ b/lobject.c @@ -402,10 +402,8 @@ static void pushstr (BuffFS *buff, const char *str, size_t l) { setsvalue2s(L, L->top, luaS_newlstr(L, str, l)); L->top++; /* may use one extra slot */ buff->pushed++; - if (buff->pushed > 1) { - luaV_concat(L, buff->pushed); /* join partial results into one */ - buff->pushed = 1; - } + luaV_concat(L, buff->pushed); /* join partial results into one */ + buff->pushed = 1; } -- cgit v1.2.3-55-g6feb