You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2001/05/29 21:47:25 UTC
cvs commit: xml-xerces/c/src/validators/schema SubstitutionGroupComparator.cpp
knoaman 01/05/29 12:47:24
Modified: c/src/validators/schema SubstitutionGroupComparator.cpp
Log:
Fix bug - memory was not allocated before call to XMLString::subString
Revision Changes Path
1.5 +11 -4 xml-xerces/c/src/validators/schema/SubstitutionGroupComparator.cpp
Index: SubstitutionGroupComparator.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/schema/SubstitutionGroupComparator.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SubstitutionGroupComparator.cpp 2001/05/28 20:55:42 1.4
+++ SubstitutionGroupComparator.cpp 2001/05/29 19:47:22 1.5
@@ -56,6 +56,9 @@
/*
* $Log: SubstitutionGroupComparator.cpp,v $
+ * Revision 1.5 2001/05/29 19:47:22 knoaman
+ * Fix bug - memory was not allocated before call to XMLString::subString
+ *
* Revision 1.4 2001/05/28 20:55:42 tng
* Schema: Null pointer checking in SubsitutionGropuComparator
*
@@ -122,15 +125,19 @@
while (substitutionGroupFullName)
{
- int commaAt = XMLString::indexOf(substitutionGroupFullName, ',');
- XMLCh* tmpURI = 0;
- XMLCh* tmpLocalpart = substitutionGroupFullName;
+ int commaAt = XMLString::indexOf(substitutionGroupFullName, chComma);
+ XMLCh tmpURI[256];
+ XMLCh tmpLocalpart[256];
+
if (commaAt >= 0)
{
if (commaAt > 0)
XMLString::subString(tmpURI, substitutionGroupFullName, 0, commaAt);
-
+
XMLString::subString(tmpLocalpart, substitutionGroupFullName, commaAt+1, XMLString::stringLen(substitutionGroupFullName));
+ }
+ else {
+ XMLString::subString(tmpLocalpart, substitutionGroupFullName, 0, XMLString::stringLen(substitutionGroupFullName));
}
if (!tmpURI)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org