This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactoring from Larry implicit in the MAD patch.
authorNicholas Clark <nick@ccl4.org>
Thu, 9 Mar 2006 18:08:52 +0000 (18:08 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 9 Mar 2006 18:08:52 +0000 (18:08 +0000)
p4raw-id: //depot/perl@27443

toke.c

diff --git a/toke.c b/toke.c
index 7128c85..f69f28a 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3171,13 +3171,14 @@ Perl_yylex(pTHX)
                CopLINE_dec(PL_curcop);
                incline(s);
            }
-           d = PL_bufend;
-           while (s < d && *s != '\n')
-               s++;
-           if (s < d)
-               s++;
-           else if (s > d) /* Found by Ilya: feed random input to Perl. */
-             Perl_croak(aTHX_ "panic: input overflow");
+           d = s;
+           while (d < PL_bufend && *d != '\n')
+               d++;
+           if (d < PL_bufend)
+               d++;
+           else if (d > PL_bufend) /* Found by Ilya: feed random input to Perl. */
+               Perl_croak(aTHX_ "panic: input overflow");
+           s = d;
            incline(s);
            if (PL_lex_formbrack && PL_lex_brackets <= PL_lex_formbrack) {
                PL_bufptr = s;