This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Adjust callsites that use UTF8SKIP without checking UTF
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index c3d3c97..e5ef340 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -5856,12 +5856,12 @@ Perl_yylex(pTHX)
                    else
                        /* skip plain q word */
                        while (t < PL_bufend && isWORDCHAR_lazy_if(t,UTF))
-                            t += UTF8SKIP(t);
+                           t += UTF ? UTF8SKIP(t) : 1;
                }
                else if (isWORDCHAR_lazy_if(t,UTF)) {
-                   t += UTF8SKIP(t);
+                   t += UTF ? UTF8SKIP(t) : 1;
                    while (t < PL_bufend && isWORDCHAR_lazy_if(t,UTF))
-                        t += UTF8SKIP(t);
+                       t += UTF ? UTF8SKIP(t) : 1;
                }
                while (t < PL_bufend && isSPACE(*t))
                    t++;