浏览代码

Shell: Restore input offset when failing to parse a redirection

This fixes #3051
AnotherTest 5 年之前
父节点
当前提交
d9a1cb440c
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Shell/Parser.cpp

+ 1 - 0
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;
     }
 }