This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec.c: Clarify comment
authorKarl Williamson <khw@cpan.org>
Thu, 26 Jan 2017 04:17:09 +0000 (21:17 -0700)
committerKarl Williamson <khw@cpan.org>
Thu, 26 Jan 2017 04:42:22 +0000 (21:42 -0700)
This now explains why we allow the input pointer to go off by 1 at the
end.

regexec.c

index 811eca2..4e4b4fd 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -8453,7 +8453,8 @@ NULL
             assert(!NEXTCHR_IS_EOS);
             if (utf8_target) {
                 locinput += PL_utf8skip[nextchr];
-                /* locinput is allowed to go 1 char off the end, but not 2+ */
+                /* locinput is allowed to go 1 char off the end (signifying
+                 * EOS), but not 2+ */
                 if (locinput > reginfo->strend)
                     sayNO;
             }