mirror of
https://github.com/lua/lua.git
synced 2026-10-28 19:45:26 +00:00
Details
typo in comment + formatting + logical 'and' was written as a bitwise operation (makes code more fragile)
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user