mirror of https://github.com/AxioDL/tinyxml2.git
fix a fopen bug: rb should be w
This commit is contained in:
parent
99024dc20b
commit
3cd66ee850
|
@ -1602,7 +1602,7 @@ int XMLDocument::SaveFile( const char* filename, bool compact )
|
||||||
errno_t err = fopen_s(&fp, filename, "w" );
|
errno_t err = fopen_s(&fp, filename, "w" );
|
||||||
if ( !fp || err) {
|
if ( !fp || err) {
|
||||||
#else
|
#else
|
||||||
fp = fopen( filename, "rb" );
|
fp = fopen( filename, "w" );
|
||||||
if ( !fp) {
|
if ( !fp) {
|
||||||
#endif
|
#endif
|
||||||
SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, filename, 0 );
|
SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, filename, 0 );
|
||||||
|
|
Loading…
Reference in New Issue