mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-26 19:31:15 -03:00
Remove triggerable assert in unescape_string_internal
Fixes #4954 - in a hacky way.
This commit is contained in:
@@ -1363,7 +1363,11 @@ static bool unescape_string_internal(const wchar_t *const input, const size_t in
|
||||
}
|
||||
case L'}': {
|
||||
if (unescape_special) {
|
||||
assert(brace_count > 0 && "imbalanced brackets are a tokenizer error, we shouldn't be able to get here");
|
||||
// HACK: The completion machinery sometimes hands us partial tokens.
|
||||
// We can't parse them properly, but it shouldn't hurt,
|
||||
// so we don't assert here.
|
||||
// See #4954.
|
||||
// assert(brace_count > 0 && "imbalanced brackets are a tokenizer error, we shouldn't be able to get here");
|
||||
brace_count--;
|
||||
brace_text_start = brace_text_start && brace_count > 0;
|
||||
to_append_or_none = BRACE_END;
|
||||
|
||||
Reference in New Issue
Block a user