You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ca...@apache.org on 2004/09/23 02:50:49 UTC
cvs commit: xml-xerces/c/src/xercesc/framework XMLRecognizer.cpp
cargilld 2004/09/22 17:50:49
Modified: c/src/xercesc/dom/deprecated DocumentImpl.cpp RangeImpl.cpp
c/src/xercesc/framework XMLRecognizer.cpp
Log:
Bug fixes reported by John Hibbert.
Revision Changes Path
1.10 +8 -5 xml-xerces/c/src/xercesc/dom/deprecated/DocumentImpl.cpp
Index: DocumentImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/deprecated/DocumentImpl.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- DocumentImpl.cpp 8 Sep 2004 13:55:43 -0000 1.9
+++ DocumentImpl.cpp 23 Sep 2004 00:50:49 -0000 1.10
@@ -787,10 +787,13 @@
, new (fMemoryManager) HashPtr()
, fMemoryManager
);
- if (!data && userData)
- userData->removeKey((void*)n);
- else
- userData->put((void*)n,data);
+ if (userData)
+ {
+ if (!data)
+ userData->removeKey((void*)n);
+ else
+ userData->put((void*)n,data);
+ }
}
void* DocumentImpl::getUserData(NodeImpl* n)
1.6 +2 -2 xml-xerces/c/src/xercesc/dom/deprecated/RangeImpl.cpp
Index: RangeImpl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/deprecated/RangeImpl.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- RangeImpl.cpp 8 Sep 2004 13:55:44 -0000 1.5
+++ RangeImpl.cpp 23 Sep 2004 00:50:49 -0000 1.6
@@ -873,7 +873,7 @@
int s = startV->size()-1;
int e = endV->size()-1;
- NodeImpl* commonAncestor;
+ NodeImpl* commonAncestor = 0;
while (s>=0 && e>=0) {
if (startV->elementAt(s) == endV->elementAt(e)) {
1.11 +2 -2 xml-xerces/c/src/xercesc/framework/XMLRecognizer.cpp
Index: XMLRecognizer.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/framework/XMLRecognizer.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- XMLRecognizer.cpp 8 Sep 2004 13:55:59 -0000 1.10
+++ XMLRecognizer.cpp 23 Sep 2004 00:50:49 -0000 1.11
@@ -252,7 +252,7 @@
XMLRecognizer::nameForEncoding(const XMLRecognizer::Encodings theEncoding
, MemoryManager* const manager)
{
- if (theEncoding > Encodings_Count)
+ if (theEncoding >= Encodings_Count)
ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::XMLRec_UnknownEncoding, manager);
return gEncodingNameMap[theEncoding];
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org