fix check when the second argument contains operator-characters

master
Marc Wäckerlin 5 years ago
parent bedf4ca32a
commit 1faebb78a0
  1. 3
      src/commands.hxx

@ -232,7 +232,7 @@ class Command: public QObject {
res += value.mid(start, m.capturedStart()-start); res += value.mid(start, m.capturedStart()-start);
value.remove(0, m.capturedEnd()); value.remove(0, m.capturedEnd());
if (keepDelimiters && !m.captured(3).isEmpty()) res+=m.captured(3).trimmed(); if (keepDelimiters && !m.captured(3).isEmpty()) res+=m.captured(3).trimmed();
if (++found==max) return res += value; if (++found==max) return value.isEmpty() ? res : res += value;
} }
return res; return res;
} }
@ -2622,6 +2622,7 @@ class Check: public Command {
throw BadArgument(tag()+" has at most three arguments", allargs); throw BadArgument(tag()+" has at most three arguments", allargs);
cmd->_value1 = allargs[0]; cmd->_value1 = allargs[0];
cmd->_cmp = allargs[1][0].toLatin1(); cmd->_cmp = allargs[1][0].toLatin1();
std::cout<<"ARGS: \""<<allargs.join("\", \"")<<"\"\n";
if (allargs.size()==3) { if (allargs.size()==3) {
cmd->_value2 = allargs[2]; cmd->_value2 = allargs[2];
} else { } else {

Loading…
Cancel
Save