|
From: <axl...@us...> - 2009-04-05 14:35:18
|
Revision: 202
http://hgengine.svn.sourceforge.net/hgengine/?rev=202&view=rev
Author: axlecrusher
Date: 2009-04-05 14:35:16 +0000 (Sun, 05 Apr 2009)
Log Message:
-----------
fix parsing of nested fallback path
Modified Paths:
--------------
Mercury2/src/XMLParser.cpp
Modified: Mercury2/src/XMLParser.cpp
===================================================================
--- Mercury2/src/XMLParser.cpp 2009-04-05 04:10:31 UTC (rev 201)
+++ Mercury2/src/XMLParser.cpp 2009-04-05 14:35:16 UTC (rev 202)
@@ -133,11 +133,16 @@
if (path.length() > 0)
{
+ printf("finding fallback %s\n", path.c_str());
int pos = path.find(".");
MString name = pos<=0?path:path.substr(0, pos);
- MString rpath = pos<=0?"":path.substr(pos);
+ MString rpath = pos<=0?"":path.substr(pos+1); //skip the period
for (XMLNode n = this->Child(); n.IsValid(); n = n.NextNode())
- if (n.Attribute("name") == name) return n.RecursiveFindFallbackNode(rpath);
+ if (n.Attribute("name") == name)
+ {
+ printf("found fallback %s\n", name.c_str());
+ return n.RecursiveFindFallbackNode(rpath);
+ }
return XMLNode();
}
return *this;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|