diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-08-14 16:26:45 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-14 14:51:31 +0200 |
commit | d9a1cb440cbccc007a3609da37f65b0418ddd293 (patch) | |
tree | 74a65f33f13c859e61d022b2eecc31f07830248d /Shell/Parser.cpp | |
parent | b97e42dcaa0c5c7d9d31ac0aab23369cc88adae5 (diff) | |
download | serenity-d9a1cb440cbccc007a3609da37f65b0418ddd293.zip |
Shell: Restore input offset when failing to parse a redirection
This fixes #3051
Diffstat (limited to 'Shell/Parser.cpp')
-rw-r--r-- | Shell/Parser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Shell/Parser.cpp b/Shell/Parser.cpp index d0eccb2867..16e33790ad 100644 --- a/Shell/Parser.cpp +++ b/Shell/Parser.cpp @@ -524,6 +524,7 @@ RefPtr<AST::Node> Parser::parse_redirection() return create<AST::ReadWriteRedirection>(pipe_fd, move(path)); // Redirection ReadWrite } default: + m_offset = rule_start->offset; return nullptr; } } |