summaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin.c b/builtin.c
index a526e40f..698ad403 100644
--- a/builtin.c
+++ b/builtin.c
@@ -650,7 +650,7 @@ static jv f_match(jq_state *jq, jv input, jv regex, jv modifiers, jv testmode) {
unsigned long len;
const char *fr = (const char*)input_string;
- for (idx = len = 0; fr != input_string+region->end[0]; len++) {
+ for (idx = len = 0; fr < input_string+region->end[0]; len++) {
if (fr == input_string+region->beg[0]) idx = len, len=0;
fr += jvp_utf8_decode_length(*fr);
}