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-e03cc46cb475master
parent
37db2e6b65
commit
47b358bcd1
|
@ -71,8 +71,7 @@ public:
|
|||
// if not end reached, parse the node
|
||||
if (P && (unsigned int)(P - TextBegin) < TextSize - 1 && *P != 0)
|
||||
{
|
||||
parseCurrentNode();
|
||||
return true;
|
||||
return parseCurrentNode();
|
||||
}
|
||||
|
||||
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
||||
|
@ -210,7 +209,8 @@ public:
|
|||
private:
|
||||
|
||||
// Reads the current xml node
|
||||
void parseCurrentNode()
|
||||
// return false if no further node is found
|
||||
bool parseCurrentNode()
|
||||
{
|
||||
char_type* start = P;
|
||||
|
||||
|
@ -218,14 +218,15 @@ private:
|
|||
while(*P != L'<' && *P)
|
||||
++P;
|
||||
|
||||
// not a node, so return false
|
||||
if (!*P)
|
||||
return;
|
||||
return false;
|
||||
|
||||
if (P - start > 0)
|
||||
{
|
||||
// we found some text, store it
|
||||
if (setText(start, P))
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
++P;
|
||||
|
@ -247,6 +248,7 @@ private:
|
|||
parseOpeningXMLElement();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue