From ad4c417d46e308a0ba8ecd644be1c81bb98829f1 Mon Sep 17 00:00:00 2001 From: oana Date: Thu, 31 Jan 2013 14:03:44 +0000 Subject: [PATCH] Bug fix: avoid infinite loop when looking for a declaration. Bug exposed by SVN commit 5383. git-svn-id: http://yate.null.ro/svn/yate/trunk@5390 acf43c95-373e-0410-b603-e72c3f656dc1 --- libs/yxml/XML.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/yxml/XML.cpp b/libs/yxml/XML.cpp index 2e865d1f..c220adc8 100644 --- a/libs/yxml/XML.cpp +++ b/libs/yxml/XML.cpp @@ -1560,7 +1560,7 @@ XmlSaxParser::Error XmlDocument::addChild(XmlChild* child) // Retrieve the document declaration XmlDeclaration* XmlDocument::declaration() const { - for (ObjList* o = m_beforeRoot.getChildren().skipNull(); o; o = o->skipNull()) { + for (ObjList* o = m_beforeRoot.getChildren().skipNull(); o; o = o->skipNext()) { XmlDeclaration* d = (static_cast(o->get()))->xmlDeclaration(); if (d) return d;