Skip to content
Snippets Groups Projects
Commit d0264845 authored by Alam Ed Arias's avatar Alam Ed Arias
Browse files

Let fix that GCC warning

parent 0768032a
Branches
No related tags found
No related merge requests found
...@@ -1586,14 +1586,16 @@ void CV_StealthSet(consvar_t *var, const char *value) ...@@ -1586,14 +1586,16 @@ void CV_StealthSet(consvar_t *var, const char *value)
*/ */
static void CV_SetValueMaybeStealth(consvar_t *var, INT32 value, boolean stealth) static void CV_SetValueMaybeStealth(consvar_t *var, INT32 value, boolean stealth)
{ {
char val[32]; char val[SKINNAMESIZE+1];
if (var == &cv_forceskin) // Special handling. if (var == &cv_forceskin) // Special handling.
{ {
const char *tmpskin = NULL;
if ((value < 0) || (value >= numskins)) if ((value < 0) || (value >= numskins))
sprintf(val, "None"); tmpskin = "None";
else else
strncpy(val, skins[value].name, sizeof val); tmpskin = skins[value].name;
strncpy(val, tmpskin, SKINNAMESIZE);
} }
else else
sprintf(val, "%d", value); sprintf(val, "%d", value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment