]> skyeroc.xyz Git - dgamelaunch/commitdiff
Ensure the watching menu page isn't outside the list. This can happen when returning
authorPasi Kallinen <paxed@alt.org>
Sat, 18 Dec 2010 12:14:25 +0000 (12:14 +0000)
committerPasi Kallinen <paxed@alt.org>
Sat, 18 Dec 2010 12:14:25 +0000 (12:14 +0000)
from watching a game on page 2 and there's fewer games being played.

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@579 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

dgamelaunch.c

index cb3eed14a3e41ffe54fae0ce97302ef6736e1ded..d0190ab14766eea08f065853775d312a959a7ef3 100644 (file)
@@ -752,6 +752,7 @@ inprogressmenu (int gameid)
       drawbanner (&banner, 1, 1);
 
       if (len > 0) {
+         while (offset >= len) { offset -= max_height; }
          if (offset < 0) offset = 0;
          mvaddstr (3, 1, "The following games are in progress:");