This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
format/write (version 2)
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index da71929..5e4c7e7 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -7617,7 +7617,7 @@ S_scan_formline(pTHX_ register char *s)
     bool eofmt = FALSE;
 
     while (!needargs) {
-       if (*s == '.' || *s == /*{*/'}') {
+       if (*s == '.') {
            /*SUPPRESS 530*/
 #ifdef PERL_STRICT_CR
            for (t = s+1;SPACE_OR_TAB(*t); t++) ;
@@ -7630,7 +7630,7 @@ S_scan_formline(pTHX_ register char *s)
             }
        }
        if (PL_in_eval && !PL_rsfp) {
-           eol = strchr(s,'\n');
+           eol = memchr(s,'\n',PL_bufend-s);
            if (!eol++)
                eol = PL_bufend;
        }