You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2002/04/03 20:22:36 UTC
cvs commit: xml-xerces/c/src/xercesc/util XMLString.cpp
tng 02/04/03 10:22:36
Modified: c/src/xercesc/util XMLString.cpp
Log:
check null string first in isWSCollapsed.
Revision Changes Path
1.2 +5 -2 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.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XMLString.cpp 1 Feb 2002 22:22:16 -0000 1.1
+++ XMLString.cpp 3 Apr 2002 18:22:36 -0000 1.2
@@ -55,7 +55,7 @@
*/
/*
- * $Id: XMLString.cpp,v 1.1 2002/02/01 22:22:16 peiyongz Exp $
+ * $Id: XMLString.cpp,v 1.2 2002/04/03 18:22:36 tng Exp $
*/
@@ -1594,7 +1594,7 @@
{
// If no string, then its a OK
if (( !toCheck ) || ( !*toCheck ))
- true;
+ return true;
const XMLCh* startPtr = toCheck;
while ( *startPtr )
@@ -1656,6 +1656,9 @@
//
bool XMLString::isWSCollapsed(const XMLCh* const toCheck)
{
+ if (( !toCheck ) || ( !*toCheck ))
+ return true;
+
// shall be whitespace::replaced first
if ( !isWSReplaced(toCheck) )
return false;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org