From: Cloudwalk Date: Fri, 24 Mar 2023 12:43:00 +0000 (-0400) Subject: fs: Use unsigned short for extra field and file comment lengths X-Git-Tag: xonotic-v0.8.6~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eb693bfa601d534d0e2f3035d1c640f1d2c220bf;p=xonotic%2Fdarkplaces.git fs: Use unsigned short for extra field and file comment lengths --- diff --git a/fs.c b/fs.c index 44c15abb..1fecfddb 100644 --- a/fs.c +++ b/fs.c @@ -743,7 +743,7 @@ static int PK3_BuildFileList (pack_t *pack, const pk3_endOfCentralDir_t *eocd) // Skip the name, additionnal field, and comment // 1er uint16 : extra field length // 2eme uint16 : file comment length - count = namesize + BuffLittleShort (&ptr[30]) + BuffLittleShort (&ptr[32]); + count = namesize + (unsigned short)BuffLittleShort (&ptr[30]) + (unsigned short)BuffLittleShort (&ptr[32]); ptr += ZIP_CDIR_CHUNK_BASE_SIZE + count; remaining -= count; }