From 578ae5745cecee56d48795cd4ae1eaf13618715c Mon Sep 17 00:00:00 2001 From: Roberto I Date: Tue, 23 Dec 2025 14:44:06 -0300 Subject: Details typo in comment + formatting + logical 'and' was written as a bitwise operation (makes code more fragile) --- lstrlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lstrlib.c') diff --git a/lstrlib.c b/lstrlib.c index 23df839e..e26eb1a8 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -968,7 +968,7 @@ static int str_gsub (lua_State *L) { reprepstate(&ms); /* (re)prepare state for new match */ if ((e = match(&ms, src, p)) != NULL && e != lastmatch) { /* match? */ n++; - changed = add_value(&ms, &b, src, e, tr) | changed; + changed = add_value(&ms, &b, src, e, tr) || changed; src = lastmatch = e; } else if (src < ms.src_end) /* otherwise, skip one character */ -- cgit v1.2.3-55-g6feb