mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
fix some silly bugs (sizeof (char*) :P)
This commit is contained in:
parent
0cf0f710b7
commit
dfa16742e2
1 changed files with 1 additions and 8 deletions
|
@ -771,13 +771,6 @@ open_file (searchpath_t *search, const char *filename, QFile **gzfile,
|
|||
return qfs_filesize;
|
||||
}
|
||||
} else {
|
||||
// sanity check the strings
|
||||
if (strnlen (search->filename, sizeof (netpath))
|
||||
+ strnlen (filename, sizeof (netpath)) + 2 > sizeof (netpath))
|
||||
Sys_Error ("open_file: search->filename and/or filename "
|
||||
"bogus: `%.*s' `%.*s'",
|
||||
(int) sizeof (netpath), search->filename,
|
||||
(int) sizeof (netpath), filename);
|
||||
// check a file in the directory tree
|
||||
netpath = nva ("%s/%s", search->filename, filename);
|
||||
|
||||
|
@ -832,7 +825,7 @@ _QFS_FOpenFile (const char *filename, QFile **gzfile,
|
|||
#endif
|
||||
#ifdef HAVE_ZLIB
|
||||
gzfilename = alloca (strlen (path) + 3 + 1);
|
||||
snprintf (gzfilename, sizeof (gzfilename), "%s.gz", path);
|
||||
sprintf (gzfilename, "%s.gz", path);
|
||||
#endif
|
||||
|
||||
// search through the path, one element at a time
|
||||
|
|
Loading…
Reference in a new issue