From 1faebb78a0e251bba41d862c98e4c68f832e035e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 27 Nov 2019 18:53:18 +0100 Subject: [PATCH] fix check when the second argument contains operator-characters --- src/commands.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands.hxx b/src/commands.hxx index bcebba0..6f9aa59 100644 --- a/src/commands.hxx +++ b/src/commands.hxx @@ -232,7 +232,7 @@ class Command: public QObject { res += value.mid(start, m.capturedStart()-start); value.remove(0, m.capturedEnd()); 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; } @@ -2622,6 +2622,7 @@ class Check: public Command { throw BadArgument(tag()+" has at most three arguments", allargs); cmd->_value1 = allargs[0]; cmd->_cmp = allargs[1][0].toLatin1(); + std::cout<<"ARGS: \""<_value2 = allargs[2]; } else {