From: H.G.Muller Date: Fri, 2 Dec 2016 08:25:13 +0000 (+0100) Subject: Fix Game List highlighting (WB) X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=84c13cc82f9b8163d8c37a8c5e0b1bd46d7b27c7;hp=d1638304f504ca6cbfa36eb7a951b530f374bd10;p=xboard.git Fix Game List highlighting (WB) The binary search for finding the current game amongst the listed ones in the Game List was not looking in the first 32 displayed entries. --- diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index 19917e6..a3c96be 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -439,7 +439,7 @@ VOID GameListHighlight(int index) res = SendDlgItemMessage( gameListDialog, OPT_GameListText, LB_GETTEXT, i, (LPARAM)buf ); if(res == LB_ERR || index < atoi( buf )) break; } - j = i/2; + j = (i == 64 ? 0 : i/2); while(i-j > 1) { n = (i + j) >> 1; res = SendDlgItemMessage( gameListDialog, OPT_GameListText, LB_GETTEXT, n, (LPARAM)buf );