Fixed error check when saving GL nodes

This commit is contained in:
alexey.lysiuk 2017-12-10 15:10:32 +02:00
parent acc943329b
commit 724c997695

View file

@ -1137,7 +1137,8 @@ static void CreateCachedNodes(MapData *map)
if (fw != nullptr) if (fw != nullptr)
{ {
if (fw->Write(compressed, outlen+offset) != 1) const size_t length = outlen + offset;
if (fw->Write(compressed, length) != length)
{ {
Printf("Error saving nodes to file %s\n", path.GetChars()); Printf("Error saving nodes to file %s\n", path.GetChars());
} }