From 7de681aa3bcfeb0102f589e322d59187990b0bc2 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 6 Nov 2021 11:20:24 -0400 Subject: [PATCH] validateWriteContext: Apply early break when detected the OR operator --- src/commands/CmdContext.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commands/CmdContext.cpp b/src/commands/CmdContext.cpp index e1f321e21..936c7b429 100644 --- a/src/commands/CmdContext.cpp +++ b/src/commands/CmdContext.cpp @@ -123,7 +123,10 @@ bool CmdContext::validateWriteContext (const std::vector & lexedArgs, std::s for (auto &arg: lexedArgs) { if (arg._lextype == Lexer::Type::op) if (arg.attribute ("raw") == "or") + { contains_or = true; + break; + } if (arg._lextype == Lexer::Type::pair) { auto modifier = arg.attribute ("modifier");