]> skyeroc.xyz Git - dgamelaunch/commitdiff
Fix a segfault when selecting a non-existent game entry to watch. Found by blackpenguin.
authorPasi Kallinen <paxed@alt.org>
Wed, 23 Dec 2009 18:04:26 +0000 (18:04 +0000)
committerPasi Kallinen <paxed@alt.org>
Wed, 23 Dec 2009 18:04:26 +0000 (18:04 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@521 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

TODO
dgamelaunch.c

diff --git a/TODO b/TODO
index 51238a227768729d471d955f9f79178ac6881ec1..f298116a27400fe472be57511e6b449cc5da18ba 100644 (file)
--- a/TODO
+++ b/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
index 31b4b70381da8dba9cfe5d2394ececd25df54d49..7ec2e4483ee00764ba0b7da259ce2719c81414eb 100644 (file)
@@ -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;
                }