commit | 189198f19c089b80a73e22299ae023879e9b323e | [log] [tgz] |
---|---|---|
author | Ant Mitchell <ant@badmagic.com> | Tue Mar 24 16:20:36 2015 +0000 |
committer | Ant Mitchell <ant@badmagic.com> | Tue Mar 24 16:20:36 2015 +0000 |
tree | c69ee81f451cfd01d520f4527e5d8b71ea1bf7d6 | |
parent | 32cca51ac507b873a5303369bd46a28e0bc978a5 [diff] [blame] |
Issue 302: clear any previous save error
diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 57a4840..f8683aa 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp
@@ -1879,6 +1879,9 @@ 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;