Fix a segfault when selecting a non-existent game entry to watch. Found by blackpenguin.
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@521 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
4b8e110006
commit
64c9bf043f
7
TODO
7
TODO
|
@ -1,3 +1,10 @@
|
|||
-when exiting from watching a player, move the cursor to the last line
|
||||
of the screen before enabling the ncurses mode; so when we exit dgl,
|
||||
the watched player's game is all visible and the menu prompt doesn't
|
||||
mess it up.
|
||||
-watching menu will hilight the first matching username... what if we have
|
||||
more than one game installed, and someone's playing more than one at the
|
||||
same time? Should also save game#, not just the username.
|
||||
-allow admin to disabling the 'm' mail key in ttyplay.
|
||||
-update README
|
||||
-maybe allow something like changed_menu="[Updated %d]" config option and
|
||||
|
|
|
@ -583,7 +583,7 @@ inprogressmenu (int gameid)
|
|||
if (strchr(selectorchars, menuchoice) && (len > 0)) {
|
||||
int sidx = strchr(selectorchars, menuchoice) - selectorchars;
|
||||
|
||||
if (sidx > max_height) {
|
||||
if ((sidx > max_height) || (sidx >= len)) {
|
||||
selected = -1;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue