From dbe930947544cf1cec1840d0322f38d00e8e2e94 Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Fri, 9 Dec 2022 17:28:23 +0400 Subject: [PATCH] engine: netchan: fixed wrong compressed file size calculation --- engine/common/net_chan.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/common/net_chan.c b/engine/common/net_chan.c index 93177df1..e2eea39e 100644 --- a/engine/common/net_chan.c +++ b/engine/common/net_chan.c @@ -978,8 +978,12 @@ int Netchan_CreateFileFragments( netchan_t *chan, const char *filename ) if( compressedFileTime >= fileTime ) { // if compressed file already created and newer than source - if( FS_FileSize( compressedfilename, false ) != -1 ) + fs_offset_t compressedSize = FS_FileSize( compressedfilename, false ); + if( compressedSize != -1 ) + { bCompressed = true; + filesize = compressedSize; + } } else {