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

View File

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