ソースを参照

Shell: Restore input offset when failing to parse a redirection

This fixes #3051
AnotherTest 4 年 前
コミット
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;
     }
 }