Fix video menu crash.

This commit is contained in:
brendon 2020-06-15 08:51:53 -07:00
parent 2d4e98a910
commit f4ecad03b7
2 changed files with 8 additions and 1 deletions

1
.gitignore vendored
View file

@ -6,6 +6,7 @@
*.filters
*.plg
*.opt
*.opensdf
.vs/
debug/
debugaxp/

View file

@ -811,7 +811,13 @@ void Menu_Draw (menuframework_s *menu)
min[0] -= SCR_ScaledVideo(len*MENU_FONT_SIZE - LCOLUMN_OFFSET*2);
}
//len = strlen(spin->itemnames[spin->curvalue]);
if (spin->curvalue >= 0) //BC 6-15-2020 crash fix if curvalue is < 0
len = strlen(spin->itemnames[spin->curvalue]);
else
len = 3;
max[0] += SCR_ScaledVideo(len*MENU_FONT_SIZE);
type = MENUITEM_ROTATE;