]> git.donarmstrong.com Git - perltidy.git/commitdiff
fixed unitialized variable problem
authorSteve Hancock <perltidy@users.sourceforge.net>
Sun, 13 Sep 2020 22:47:26 +0000 (15:47 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Sun, 13 Sep 2020 22:47:26 +0000 (15:47 -0700)
lib/Perl/Tidy/Tokenizer.pm

index f2a92e56b859f5159cb579adfc04720737c9ccf4..99dd2619a254a6c306b2127714b76a8e9980c801 100644 (file)
@@ -7359,7 +7359,9 @@ sub follow_quoted_string {
                 }
             }
             else {
-                $quoted_string .= substr( $tok, $old_pos );
+                if ( $old_pos <= length($tok) ) {
+                    $quoted_string .= substr( $tok, $old_pos );
+                }
             }
         }
     }