mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 13:21:20 +00:00
Merge branch 'fix-forceskin-none-segfault' into 'next'
Fix segfault when setting forceskin to None See merge request STJr/SRB2!2478
This commit is contained in:
commit
332445ae55
1 changed files with 3 additions and 4 deletions
|
@ -2065,11 +2065,10 @@ static void CV_SetValueMaybeStealth(consvar_t *var, INT32 value, boolean stealth
|
|||
if (var == &cv_forceskin) // Special handling.
|
||||
{
|
||||
const char *tmpskin = NULL;
|
||||
if ((value < 0) || (value >= numskins))
|
||||
;
|
||||
else
|
||||
if (value >= 0 && value < numskins)
|
||||
tmpskin = skins[value]->name;
|
||||
memcpy(val, tmpskin, SKINNAMESIZE);
|
||||
if (tmpskin)
|
||||
memcpy(val, tmpskin, SKINNAMESIZE);
|
||||
}
|
||||
else
|
||||
sprintf(val, "%d", value);
|
||||
|
|
Loading…
Reference in a new issue