apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r454200 - /apr/apr/trunk/strings/apr_fnmatch.c
Date Sun, 08 Oct 2006 20:15:57 GMT
Author: coar
Date: Sun Oct  8 13:15:56 2006
New Revision: 454200

URL: http://svn.apache.org/viewvc?view=rev&rev=454200
Log:
If *pattern == '\\', and it does since that's the case we're in,
then (*pattern++ == '\0') will always fail.  Need to advance the
pointer *before* the comparison.

Reviewed: jerenkrantz

Modified:
    apr/apr/trunk/strings/apr_fnmatch.c

Modified: apr/apr/trunk/strings/apr_fnmatch.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/strings/apr_fnmatch.c?view=diff&rev=454200&r1=454199&r2=454200
==============================================================================
--- apr/apr/trunk/strings/apr_fnmatch.c (original)
+++ apr/apr/trunk/strings/apr_fnmatch.c Sun Oct  8 13:15:56 2006
@@ -225,7 +225,7 @@
 	    return 1;
 
 	case '\\':
-	    if (*pattern++ == '\0') {
+	    if (*++pattern == '\0') {
 		return 0;
 	    }
 	    break;



Mime
View raw message