You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2004/07/12 23:09:01 UTC
cvs commit: xml-xerces/c/src/xercesc/util XMLString.cpp
peiyongz 2004/07/12 14:09:01
Modified: c/src/xercesc/util XMLString.cpp
Log:
Increment patnIndex only when a match is found
Revision Changes Path
1.34 +4 -3 xml-xerces/c/src/xercesc/util/XMLString.cpp
Index: XMLString.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMLString.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- XMLString.cpp 28 Jun 2004 18:36:49 -0000 1.33
+++ XMLString.cpp 12 Jul 2004 21:09:01 -0000 1.34
@@ -1166,16 +1166,17 @@
while (*srcPtr)
{
- if ( !(*srcPtr++ == pattern[patnIndex++]))
+ if ( !(*srcPtr++ == pattern[patnIndex]))
{
patnIndex = 0;
srcPtr = ++patnStart;
}
else
{
- if (patnIndex == patnLen)
+ if (++patnIndex == patnLen)
// full pattern match found
return (srcPtr - patnLen - toSearch);
+
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org