X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwgamelist.c;h=a3c96be6877ce6782753d6852d62ea02d06ab1d9;hb=ab773ff40f992d0462d500b429d4df863be9d288;hp=19917e6a1cbd08cc082113ff21a4a466d94941a7;hpb=0278ebc80411a20fd23303156285e55ce8d2b0a5;p=xboard.git 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 );