From 1834e962d2e6cc83cc9294562cbf0b29b907787f Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Thu, 11 Apr 2019 17:18:53 -0700 Subject: [PATCH] Correct carat position for unexpected } in brace expansion before: $ echo {}}- fish: Unexpected '}' for unopened brace expansion $ ./fish -c 'echo {}}}}' fish: Unexpected '}' for unopened brace expansion echo {}}}} ^ now: $ echo {}}}}}}1- fish: Unexpected '}' for unopened brace expansion echo {}}}}}} ^ --- src/tokenizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index ef55b7877..883a04afc 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -196,8 +196,8 @@ tok_t tokenizer_t::read_string() { } switch (brace_offsets.size()) { case 0: - return this->call_error(tokenizer_error_t::closing_unopened_brace, this->start, - this->buff); + return this->call_error(tokenizer_error_t::closing_unopened_brace, this->buff, + this->start + wcslen(this->start)); case 1: mode &= ~(tok_modes::curly_braces); default: