You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store start of slice string as bytes, not chars (#1186)
Not all functions access the string's backing memory according to the
string's encoding. js_regexp_match in particular uses str8 for both
ascii and wide strings. Because the offset into the parent string
was stored in characters, js_regexp_match used the wrong offset (off
by 50%) for wide slice strings.
It's conceivable other functions do something similarly ill-advised,
so store the start in bytes instead of characters from now on.
Fixes: #1178
0 commit comments