[Super-tux-commit] supertux/src menu.cpp,1.67,1.68
Brought to you by:
wkendrick
From: Ryan F. <sik...@us...> - 2004-05-13 02:40:19
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14525 Modified Files: menu.cpp Log Message: - fixed potential crash Index: menu.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/menu.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- menu.cpp 9 May 2004 18:08:01 -0000 1.67 +++ menu.cpp 13 May 2004 02:40:10 -0000 1.68 @@ -480,6 +480,9 @@ } menuaction = MENU_ACTION_NONE; + + if (active_item >= item.size()) + active_item = int(item.size()) - 1; } int |