From: Pasi Kallinen Date: Sat, 18 Dec 2010 12:14:25 +0000 (+0000) Subject: Ensure the watching menu page isn't outside the list. This can happen when returning X-Git-Tag: v1.6.1-roc-dev~131 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=8fdf52f018c9eafda92bc0fb5ad62ed5d895efa2;p=dgamelaunch Ensure the watching menu page isn't outside the list. This can happen when returning 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 --- diff --git a/dgamelaunch.c b/dgamelaunch.c index cb3eed1..d0190ab 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -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:");