X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=fs.c;h=67d65713f498da5fb495fd50cbc74e17004dfe18;hp=994155aa290fe5ad69bb3b05e7531ae28995b64d;hb=f03582e35cefdf917bd15716dedb18fca8224654;hpb=7506ea41659c70df01c8ee59681ab2a21128d832 diff --git a/fs.c b/fs.c index 994155aa..67d65713 100644 --- a/fs.c +++ b/fs.c @@ -797,7 +797,11 @@ static qboolean PK3_GetTrueFileOffset (packfile_t *pfile, pack_t *pack) return true; // Load the local file description - lseek (pack->handle, pfile->offset, SEEK_SET); + if (lseek (pack->handle, pfile->offset, SEEK_SET) == -1) + { + Con_Printf ("Can't seek in package %s\n", pack->filename); + return false; + } count = read (pack->handle, buffer, ZIP_LOCAL_CHUNK_BASE_SIZE); if (count != ZIP_LOCAL_CHUNK_BASE_SIZE || BuffBigLong (buffer) != ZIP_DATA_HEADER) {