From cd00c0d0849be13ae755dd6187b2f4b0e217fbae Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 24 Oct 2011 09:43:59 +0000 Subject: [PATCH] minor patch --- lib/core/agent.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index c625783d6..9a49812f5 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -94,7 +94,9 @@ class Agent: else: value = "-%s" % randomInt() else: - value = "%s AND %s=%s" % (origValue, randomInt(2), randomInt(2)) + match = re.search(r'\A[^ ]+', newValue) + newValue = newValue[len(match.group() if match else ""):] + value = "%s%s AND %s=%s" % (origValue, match.group() if match else "", randomInt(2), randomInt(2)) elif where == PAYLOAD.WHERE.REPLACE: value = "" else: