diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 2837aceb3..2f49d47af 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -1311,10 +1311,10 @@ void CLI2::desugarFilterPlainArgs () { bool changes = false; std::vector reconstructed; - auto& prev = _args[0]; + auto prev = &_args[0]; for (auto& a : _args) { - if (prev._lextype != Lexer::Type::op && + if (prev->_lextype != Lexer::Type::op && a.hasTag ("FILTER") && (a._lextype == Lexer::Type::dom || a._lextype == Lexer::Type::identifier || @@ -1342,7 +1342,7 @@ void CLI2::desugarFilterPlainArgs () else reconstructed.push_back (a); - prev = a; + prev = &a; } if (changes)