mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix for crash on redirections
This commit is contained in:
parent
5fe7c065dc
commit
917b4ff8bc
1 changed files with 4 additions and 1 deletions
|
@ -1085,7 +1085,10 @@ static void tokenize( const wchar_t * const buff, std::vector<int> &color, const
|
|||
break;
|
||||
default:
|
||||
{
|
||||
color.at(tok_get_pos( &tok )) = HIGHLIGHT_ERROR;
|
||||
size_t pos = tok_get_pos(&tok);
|
||||
if (pos < color.size()) {
|
||||
color.at(pos) = HIGHLIGHT_ERROR;
|
||||
}
|
||||
if( error )
|
||||
error->push_back(L"Invalid redirection");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue