mirror of
https://github.com/leethomason/tinyxml2.git
synced 2026-07-21 19:23:00 +04:00
In PrintString, move the optimization under the if ( _processEntities ) block and retain the strlen Write in the new else block. Added a test case.
This commit is contained in:
+11
@@ -1995,6 +1995,17 @@ int main( int argc, const char ** argv )
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
const char* html("<!DOCTYPE html><html><body><p>test</p><p><br/></p></body></html>");
|
||||
XMLDocument doc(false);
|
||||
doc.Parse(html);
|
||||
|
||||
XMLPrinter printer(0, true);
|
||||
doc.Print(&printer);
|
||||
|
||||
XMLTest(html, html, printer.CStr());
|
||||
}
|
||||
|
||||
{
|
||||
// Evil memory leaks.
|
||||
// If an XMLElement (etc) is allocated via NewElement() (etc.)
|
||||
|
||||
Reference in New Issue
Block a user