X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwgamelist.c;h=a3c96be6877ce6782753d6852d62ea02d06ab1d9;hb=6af61ce31b024cb65ba65e3b22586bc12839915d;hp=e31f184128e19180c407d08de71203cd49fac73f;hpb=14005df069bf869fc3185ebb19b3460aa041f1bc;p=xboard.git diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c index e31f184..a3c96be 100644 --- a/winboard/wgamelist.c +++ b/winboard/wgamelist.c @@ -1,7 +1,8 @@ /* * wgamelist.c -- Game list window for WinBoard * - * Copyright 1995, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. + * Copyright 1995, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free + * Software Foundation, Inc. * * Enhancements Copyright 2005 Alessandro Scotti * @@ -438,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 );