Prevent rival name code from overflowing

This commit is contained in:
NepDisk 2025-10-16 11:17:07 -04:00
parent 1d6ad4415a
commit 76257fed20

View file

@ -829,6 +829,12 @@ static boolean R_ProcessPatchableFields(skin_t *skin, char *stoken, char *value)
continue;
}
if (pos > SKINNAMESIZE)
{
CONS_Alert(CONS_ERROR, "Rival names for skin %s are too long.\n", skin->name);
break;
}
rivalname[pos] = value[i];
pos++;
}