From 84c13cc82f9b8163d8c37a8c5e0b1bd46d7b27c7 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 2 Dec 2016 09:25:13 +0100 Subject: [PATCH] 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. --- winboard/wgamelist.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 ); -- 1.7.0.4