From 724c9976951bcf85a82ea9d06e125fee640a811c Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 10 Dec 2017 15:10:32 +0200 Subject: [PATCH] Fixed error check when saving GL nodes --- src/p_glnodes.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_glnodes.cpp b/src/p_glnodes.cpp index 977426e572..bd574ad837 100644 --- a/src/p_glnodes.cpp +++ b/src/p_glnodes.cpp @@ -1137,7 +1137,8 @@ static void CreateCachedNodes(MapData *map) 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()); }