Fix ignored writeStr return value in TiXmlDocument::SaveFile
Previously the TiXmlDocument::SaveFile could return true even when the underlying writeStr func failed. Close #13774
This commit is contained in:
parent
28594daef3
commit
b0e849fe65
|
@ -784,8 +784,7 @@ bool TiXmlDocument::SaveFile( const TCHAR * filename ) const
|
|||
std::unique_ptr<std::string> outputStr = std::make_unique<std::string>();
|
||||
Print(*outputStr, 0);
|
||||
if (!outputStr->empty())
|
||||
file.writeStr(*outputStr);
|
||||
return true;
|
||||
return file.writeStr(*outputStr);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue