Fix setvar action to accept equals nothing

This commit is contained in:
Felipe Zimmerle 2016-06-23 15:48:23 -03:00
parent cf2ffe7e11
commit 0fdde52532
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -65,10 +65,8 @@ bool SetVar::init(std::string *error) {
m_variableName = std::string(m_parser_payload, pos + 1,
pos2 - (pos + 1));
if (pos2 + 2 > m_parser_payload.length()) {
error->assign("Something wrong with the input format");
return false;
}
m_predicate = "";
} else {
if (m_operation == setOperation) {
m_predicate = std::string(m_parser_payload, pos2 + 1,
m_parser_payload.length() - (pos2));
@ -78,6 +76,7 @@ bool SetVar::init(std::string *error) {
- (pos2 + 1));
}
}
}
if (m_collectionName.empty() || m_variableName.empty()) {
error->assign("Something wrong with the input format");