summaryrefslogtreecommitdiff
path: root/libs/Pcre16/src/pcre_exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/Pcre16/src/pcre_exec.c')
-rw-r--r--libs/Pcre16/src/pcre_exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/Pcre16/src/pcre_exec.c b/libs/Pcre16/src/pcre_exec.c
index 5cff0d62a6..1a9bdd546e 100644
--- a/libs/Pcre16/src/pcre_exec.c
+++ b/libs/Pcre16/src/pcre_exec.c
@@ -6685,7 +6685,8 @@ if (md->offset_vector != NULL)
register int *iend = iptr - re->top_bracket;
if (iend < md->offset_vector + 2) iend = md->offset_vector + 2;
while (--iptr >= iend) *iptr = -1;
- md->offset_vector[0] = md->offset_vector[1] = -1;
+ if (offsetcount > 0) md->offset_vector[0] = -1;
+ if (offsetcount > 1) md->offset_vector[1] = -1;
}
/* Set up the first character to match, if available. The first_char value is