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
Make that if (res > 0 && res <= max_val). If no valid unicode escape is read this stays at 0.
That has the side effect of making \x00 an error as well, which is probably correct considering it can't be passed to commands, not even (currently) to builtins. So it causes things like #8468, which we currently answer by saying "don't do that, then", when, as far as I can tell, the only use for these is in string replace -r inside quotes. This could be handled with a flag to indicate NULLs are acceptable.
The error message might need some work (this would error with "invalid token" with no further explanation).
I went for the simple fix - escapes with no valid digits are rejected. Other things, including NULLs (which are unusable in most contexts) can be done later.
We report a tokenizer error on some invalid escape sequences
but on others we silently interpret them as NUL bytes, which breaks many of our internal assumptions.
The fixes to #8195 fixed resulting issues in autoloading.
We should report a tokenizer error and maybe revert the fixes.
The text was updated successfully, but these errors were encountered: