git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7867
d7cf8633-e32d-0410-b094-
e92efae38249
int Mod_Alias_GetTagIndexForName(const model_t *model, unsigned int skin, const char *tagname)
{
int i;
+ if(skin >= (unsigned int)model->numskins)
+ skin = 0;
if (model->data_overridetagnamesforskin && skin < (unsigned int)model->numskins && model->data_overridetagnamesforskin[(unsigned int)skin].num_overridetagnames)
for (i = 0;i < model->data_overridetagnamesforskin[skin].num_overridetagnames;i++)
if (!strcasecmp(tagname, model->data_overridetagnamesforskin[skin].data_overridetagnames[i].name))