Skip to content
Snippets Groups Projects
Commit e43deddc authored by David Abram Cargill's avatar David Abram Cargill
Browse files

Fix for jira bug 1234. Infinite loop in XSComplexTypeDefinition::derviedFromType.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@176142 13f79535-47bb-0310-9956-ffa450edef68
parent 9e6e07d0
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,9 @@
/*
* $Log$
* Revision 1.14 2004/10/15 11:15:44 cargilld
* Fix for jira bug 1234. Infinite loop in XSComplexTypeDefinition::derviedFromType.
*
* Revision 1.13 2004/09/08 13:56:08 peiyongz
* Apache License Version 2.0
*
......@@ -225,9 +228,11 @@ bool XSComplexTypeDefinition::derivedFromType(const XSTypeDefinition * const anc
return false;
XSTypeDefinition* type = this;
XSTypeDefinition* lastType = 0; // anytype has a basetype of anytype so will have infinite loop...
while (type && (type != ancestorType))
while (type && (type != ancestorType) && (type != lastType))
{
lastType = type;
type = type->getBaseType();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment