typo in comment + formatting + logical 'and' was written as a bitwise
operation (makes code more fragile)
This commit is contained in:
Roberto I
2025-12-23 14:44:06 -03:00
parent a5522f06d2
commit 578ae5745c
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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 */