mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-18 09:51:40 +00:00
Fix a segfault when centerprinting.
The dstring wasn't getting initialized :/
This commit is contained in:
parent
89ec14e0fc
commit
a3f0a559a5
3 changed files with 5 additions and 4 deletions
|
@ -381,4 +381,6 @@ void CL_RSShot_f (void);
|
||||||
#define RSSHOT_WIDTH 320
|
#define RSSHOT_WIDTH 320
|
||||||
#define RSSHOT_HEIGHT 200
|
#define RSSHOT_HEIGHT 200
|
||||||
|
|
||||||
|
extern struct dstring_s *centerprint;
|
||||||
|
|
||||||
#endif // _CLIENT_H
|
#endif // _CLIENT_H
|
||||||
|
|
|
@ -433,6 +433,8 @@ CL_ClearState (void)
|
||||||
// clear other arrays
|
// clear other arrays
|
||||||
memset (cl_efrags, 0, sizeof (cl_efrags));
|
memset (cl_efrags, 0, sizeof (cl_efrags));
|
||||||
memset (r_lightstyle, 0, sizeof (r_lightstyle));
|
memset (r_lightstyle, 0, sizeof (r_lightstyle));
|
||||||
|
|
||||||
|
dstring_clearstr (centerprint);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1751,6 +1753,7 @@ Host_Init (void)
|
||||||
|
|
||||||
pr_gametype = "quakeworld";
|
pr_gametype = "quakeworld";
|
||||||
|
|
||||||
|
centerprint = dstring_newstr ();
|
||||||
cls.userinfo = Info_ParseString ("", MAX_INFO_STRING, 0);
|
cls.userinfo = Info_ParseString ("", MAX_INFO_STRING, 0);
|
||||||
cls.servername = dstring_newstr ();
|
cls.servername = dstring_newstr ();
|
||||||
cls.downloadtempname = dstring_newstr ();
|
cls.downloadtempname = dstring_newstr ();
|
||||||
|
|
|
@ -1217,10 +1217,6 @@ CL_ServerInfo (void)
|
||||||
// movevars.ktjump = atof (value);
|
// movevars.ktjump = atof (value);
|
||||||
// FIXME: need to set to 0.5 otherwise, outside of else structure
|
// FIXME: need to set to 0.5 otherwise, outside of else structure
|
||||||
}
|
}
|
||||||
if (!centerprint)
|
|
||||||
centerprint = dstring_newstr ();
|
|
||||||
else
|
|
||||||
dstring_clearstr (centerprint);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue