From bb6bf69a6e1ccabac19b0537534601ae369f15a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Herczeg?= Date: Tue, 25 Nov 2014 09:06:27 +0000 Subject: [PATCH] Move all offset initialization to one place. --- src/pcre2_jit_compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pcre2_jit_compile.c b/src/pcre2_jit_compile.c index 5b431bc..50808a3 100644 --- a/src/pcre2_jit_compile.c +++ b/src/pcre2_jit_compile.c @@ -3603,6 +3603,8 @@ if (range_right >= 0) } offsets[0] = -1; +offsets[1] = -1; +offsets[2] = -1; /* Scan forward. */ for (i = 0; i < max; i++) if (ones[i] <= 2) { @@ -3616,7 +3618,6 @@ if (offsets[0] < 0 && range_right < 0) if (offsets[0] >= 0) { /* Scan backward. */ - offsets[1] = -1; for (i = max - 1; i > offsets[0]; i--) if (ones[i] <= 2 && i != range_right) { @@ -3628,7 +3629,6 @@ if (offsets[0] >= 0) if (offsets[1] == -1 && offsets[0] == 0 && range_right < 0) return FALSE; - offsets[2] = -1; /* We only search for a middle character if there is no range check. */ if (offsets[1] >= 0 && range_right == -1) {