mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
[util] Fix a string handling bug
Good grief, they still exist :(
This commit is contained in:
parent
8309e1852a
commit
c4a0f3cc73
1 changed files with 3 additions and 4 deletions
|
@ -1055,11 +1055,10 @@ _QFS_VOpenFile (const char *filename, int zip,
|
|||
ind = 0;
|
||||
#ifdef HAVE_VORBIS
|
||||
if (strequal (".wav", QFS_FileExtension (path))) {
|
||||
char *oggfilename;
|
||||
oggfilename = alloca (strlen (path) + 1);
|
||||
size_t len = strlen (path);
|
||||
char *oggfilename = alloca (len + 1);
|
||||
QFS_StripExtension (path, oggfilename);
|
||||
strncat (oggfilename, ".ogg",
|
||||
sizeof (oggfilename) - strlen (oggfilename) - 1);
|
||||
strcat (oggfilename, ".ogg");
|
||||
fnames[ind] = oggfilename;
|
||||
zip_flags[ind] = 0;
|
||||
ind++;
|
||||
|
|
Loading…
Reference in a new issue