Author: adsb
Date: 2009-05-31 17:05:17 +0000 (Sun, 31 May 2009)
New Revision: 1896

Modified:
   trunk/debian/changelog
   trunk/scripts/checkbashisms.pl
Log:
Correctly count the number of quotes in a line when detecting whether
we are currently inside a "quoted block".  Thanks, Raphael Geissert.
(Closes: #531247)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2009-05-29 17:11:23 UTC (rev 1895)
+++ trunk/debian/changelog      2009-05-31 17:05:17 UTC (rev 1896)
@@ -12,6 +12,9 @@
       arguments to a sourced script.  Thanks, Raphael Geissert.
     + Detect use of passing arguments to a sourced script as part of a
       conditional statement.  Thanks, Raphael Geissert.
+    + Correctly count the number of quotes in a line when detecting whether
+      we are currently inside a "quoted block".  Thanks, Raphael Geissert.
+      (Closes: #531247)
   * licensecheck: Fix an error in a regular expression which led to an
     uninitialized value warning and missing version for some GPL headers.
     Thanks, Jakub Wilk.  (Closes: #531059)

Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl      2009-05-29 17:11:23 UTC (rev 1895)
+++ trunk/scripts/checkbashisms.pl      2009-05-31 17:05:17 UTC (rev 1896)
@@ -265,7 +265,7 @@
                    $templine =~ s/$otherquote.*?$quote.*?$otherquote//g;
                    # "\""
                    $templine =~ s/(^|[^\\])$quote\\$quote$quote/$1/g;
-                   my $count = () = $templine =~ /(^|[^\\])$quote/g;
+                   my $count = () = $templine =~ /(^|(?!\\))$quote/g;
 
                    # If there's an odd number of non-escaped
                    # quotes in the line it's almost certainly the



-- 
To unsubscribe, send mail to [email protected].

Reply via email to