From d9a1cb440cbccc007a3609da37f65b0418ddd293 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Fri, 14 Aug 2020 16:26:45 +0430 Subject: [PATCH] Shell: Restore input offset when failing to parse a redirection This fixes #3051 --- Shell/Parser.cpp | 1 + 1 file changed, 1 insertion(+) 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 Parser::parse_redirection() return create(pipe_fd, move(path)); // Redirection ReadWrite } default: + m_offset = rule_start->offset; return nullptr; } }