1
0
mirror of https://github.com/leethomason/tinyxml2.git synced 2026-07-29 15:13:01 +04:00

Issue 302: clear any previous save error

This commit is contained in:
Ant Mitchell
2015-03-24 16:20:36 +00:00
parent 32cca51ac5
commit 189198f19c
2 changed files with 12 additions and 0 deletions
+3
View File
@@ -1879,6 +1879,9 @@ XMLError XMLDocument::SaveFile( const char* filename, bool compact )
XMLError XMLDocument::SaveFile( FILE* fp, bool compact )
{
// Clear any error from the last save, otherwise it will get reported
// for *this* call.
SetError( XML_NO_ERROR, 0, 0 );
XMLPrinter stream( fp, compact );
Print( &stream );
return _errorID;