X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=fs.c;h=e682f6fa482942776d040aa0198388905dec0cc5;hb=8367a30715017e7a497f6baf65dbaff5f72d6cf3;hp=cd7a6fba19e72c4ca60a5cd0f8b9ce0dd16bc31b;hpb=6ae403f79ea5b57f944f88956e62350c9a641f1f;p=xonotic%2Fdarkplaces.git diff --git a/fs.c b/fs.c index cd7a6fba..e682f6fa 100644 --- a/fs.c +++ b/fs.c @@ -587,8 +587,8 @@ static qboolean PK3_GetEndOfCentralDir (const char *packfile, int packhandle, pk Mem_Free (buffer); if ( - eocd->cdir_size < 0 || eocd->cdir_size > filesize || - eocd->cdir_offset < 0 || eocd->cdir_offset >= filesize || + eocd->cdir_size > filesize || + eocd->cdir_offset >= filesize || eocd->cdir_offset + eocd->cdir_size > filesize ) { @@ -1642,7 +1642,7 @@ FS_CheckGameDir const char *FS_CheckGameDir(const char *gamedir) { const char *ret; - char buf[8192]; + static char buf[8192]; char vabuf[1024]; if (FS_CheckNastyPath(gamedir, true)) @@ -2759,7 +2759,7 @@ fs_offset_t FS_Write (qfile_t* file, const void* data, size_t datasize) { if (lseek (file->handle, file->buff_ind - file->buff_len, SEEK_CUR) == -1) { - Con_Printf("WARNING: could not seek in %s.\n"); + Con_Printf("WARNING: could not seek in %s.\n", file->filename); } } @@ -3350,7 +3350,7 @@ void FS_DefaultExtension (char *path, const char *extension, size_t size_path) // if path doesn't have a .EXT, append extension // (extension should include the .) - src = path + strlen(path) - 1; + src = path + strlen(path); while (*src != '/' && src != path) {