Commit 47b358bc authored by hybrid's avatar hybrid

Fix a problem with whitespace at end of XML files.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1548 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 37db2e6b
...@@ -71,8 +71,7 @@ public: ...@@ -71,8 +71,7 @@ public:
// if not end reached, parse the node // if not end reached, parse the node
if (P && (unsigned int)(P - TextBegin) < TextSize - 1 && *P != 0) if (P && (unsigned int)(P - TextBegin) < TextSize - 1 && *P != 0)
{ {
parseCurrentNode(); return parseCurrentNode();
return true;
} }
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
...@@ -210,7 +209,8 @@ public: ...@@ -210,7 +209,8 @@ public:
private: private:
// Reads the current xml node // Reads the current xml node
void parseCurrentNode() // return false if no further node is found
bool parseCurrentNode()
{ {
char_type* start = P; char_type* start = P;
...@@ -218,14 +218,15 @@ private: ...@@ -218,14 +218,15 @@ private:
while(*P != L'<' && *P) while(*P != L'<' && *P)
++P; ++P;
// not a node, so return false
if (!*P) if (!*P)
return; return false;
if (P - start > 0) if (P - start > 0)
{ {
// we found some text, store it // we found some text, store it
if (setText(start, P)) if (setText(start, P))
return; return true;
} }
++P; ++P;
...@@ -247,6 +248,7 @@ private: ...@@ -247,6 +248,7 @@ private:
parseOpeningXMLElement(); parseOpeningXMLElement();
break; break;
} }
return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment