diff --git a/apps/opencs/model/filter/parser.cpp b/apps/opencs/model/filter/parser.cpp index 2320aa0bec..abdc3bab39 100644 --- a/apps/opencs/model/filter/parser.cpp +++ b/apps/opencs/model/filter/parser.cpp @@ -47,7 +47,7 @@ namespace CSMFilter std::string mString; double mNumber; - Token (Type type); + Token (Type type = Type_None); Token (const std::string& string); @@ -521,9 +521,12 @@ bool CSMFilter::Parser::parse (const std::string& filter, bool allowPredefined) mInput = filter; mIndex = 0; - Token token = getNextToken(); + Token token; - if (token==Token (Token::Type_OneShot)) + if (allowPredefined) + token = getNextToken(); + + if (!allowPredefined || token==Token (Token::Type_OneShot)) { boost::shared_ptr node = parseImp (true);