From 38caadff03424ad287c10a1021a796ad4c79b5b9 Mon Sep 17 00:00:00 2001 From: "Philip.Hazel" Date: Fri, 4 Dec 2015 14:34:35 +0000 Subject: [PATCH] Fix typo introduced by ChangeLog 107. --- src/pcre2_compile.c | 18 +++++++++--------- testdata/testinput5 | 2 ++ testdata/testoutput5 | 3 +++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index 3a76401..632f64a 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -5058,26 +5058,26 @@ for (;; ptr++) if ((options & PCRE2_EXTENDED) != 0) { - PCRE2_SPTR p = ptr + 1; + ptr++; for (;;) { - while (MAX_255(*p) && (cb->ctypes[*p] & ctype_space) != 0) p++; - if (*p != CHAR_NUMBER_SIGN) break; - p++; + while (MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_space) != 0) ptr++; + if (*ptr != CHAR_NUMBER_SIGN) break; + ptr++; while (ptr < cb->end_pattern) { - if (IS_NEWLINE(p)) /* For non-fixed-length newline cases, */ + if (IS_NEWLINE(ptr)) /* For non-fixed-length newline cases, */ { /* IS_NEWLINE sets cb->nllen. */ - p += cb->nllen; + ptr += cb->nllen; break; } - p++; + ptr++; #ifdef SUPPORT_UNICODE - if (utf) FORWARDCHAR(p); + if (utf) FORWARDCHAR(ptr); #endif } /* Loop for comment characters */ } /* Loop for multiple comments */ - ptr = p - 1; /* Character before the next significant one. */ + ptr--; /* Last code unit of previous character. */ } /* If the next character is '+', we have a possessive quantifier. This diff --git a/testdata/testinput5 b/testdata/testinput5 index a9a1d7c..eeb0bff 100644 --- a/testdata/testinput5 +++ b/testdata/testinput5 @@ -1716,4 +1716,6 @@ /L(?#(|++