mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
buffer overflow fix
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1534 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
9134a6e097
commit
87ff696bb1
1 changed files with 3 additions and 3 deletions
|
@ -122,7 +122,7 @@ extern mtexinfo_t r_skytexinfo[6];
|
|||
|
||||
extern cvar_t gl_skyboxname;
|
||||
|
||||
char skyname[128];
|
||||
char skyname[64];
|
||||
|
||||
/*
|
||||
================
|
||||
|
@ -137,11 +137,11 @@ void R_LoadSkyBox (void)
|
|||
char pathname[MAX_QPATH];
|
||||
for (i=0 ; i<6 ; i++)
|
||||
{
|
||||
sprintf (pathname, "env/%s%s.tga", skyname, suf[r_skysideimage[i]]);
|
||||
_snprintf (pathname, MAX_QPATH-1, "env/%s%s.tga", skyname, suf[r_skysideimage[i]]);
|
||||
r_skytexinfo[i].texture = Mod_LoadWall (pathname); //preferable
|
||||
if (!r_skytexinfo[i].texture)
|
||||
{
|
||||
sprintf (pathname, "env/%s%s.pcx", skyname, suf[r_skysideimage[i]]);
|
||||
_snprintf (pathname, MAX_QPATH-1, "env/%s%s.pcx", skyname, suf[r_skysideimage[i]]);
|
||||
r_skytexinfo[i].texture = Mod_LoadWall (pathname); //q2 fall back
|
||||
}
|
||||
if (!r_skytexinfo[i].texture)
|
||||
|
|
Loading…
Reference in a new issue