mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-20 09:52:18 +00:00
Let fix that GCC warning
This commit is contained in:
parent
0768032a43
commit
d02648450a
1 changed files with 5 additions and 3 deletions
|
@ -1586,14 +1586,16 @@ void CV_StealthSet(consvar_t *var, const char *value)
|
|||
*/
|
||||
static void CV_SetValueMaybeStealth(consvar_t *var, INT32 value, boolean stealth)
|
||||
{
|
||||
char val[32];
|
||||
char val[SKINNAMESIZE+1];
|
||||
|
||||
if (var == &cv_forceskin) // Special handling.
|
||||
{
|
||||
const char *tmpskin = NULL;
|
||||
if ((value < 0) || (value >= numskins))
|
||||
sprintf(val, "None");
|
||||
tmpskin = "None";
|
||||
else
|
||||
strncpy(val, skins[value].name, sizeof val);
|
||||
tmpskin = skins[value].name;
|
||||
strncpy(val, tmpskin, SKINNAMESIZE);
|
||||
}
|
||||
else
|
||||
sprintf(val, "%d", value);
|
||||
|
|
Loading…
Reference in a new issue