mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +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;
|
return qfs_filesize;
|
||||||
}
|
}
|
||||||
} else {
|
} 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
|
// check a file in the directory tree
|
||||||
netpath = nva ("%s/%s", search->filename, filename);
|
netpath = nva ("%s/%s", search->filename, filename);
|
||||||
|
|
||||||
|
@ -832,7 +825,7 @@ _QFS_FOpenFile (const char *filename, QFile **gzfile,
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
gzfilename = alloca (strlen (path) + 3 + 1);
|
gzfilename = alloca (strlen (path) + 3 + 1);
|
||||||
snprintf (gzfilename, sizeof (gzfilename), "%s.gz", path);
|
sprintf (gzfilename, "%s.gz", path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// search through the path, one element at a time
|
// search through the path, one element at a time
|
||||||
|
|
Loading…
Reference in a new issue