fix test to hide menu when it'll otherwise cause an array

out-of-bounds exception. Thanks Aidan.
This commit is contained in:
Eric House 2015-10-07 08:06:26 -07:00
parent 3635abb17d
commit 7878fd8fcc

View file

@ -1322,7 +1322,7 @@ public class GamesListDelegate extends ListDelegateBase
// selected // selected
enable = 1 == nGroupsSelected; enable = 1 == nGroupsSelected;
Utils.setItemVisible( menu, R.id.games_group_moveup, Utils.setItemVisible( menu, R.id.games_group_moveup,
enable && 0 <= selGroupPos ); enable && 0 < selGroupPos );
Utils.setItemVisible( menu, R.id.games_group_movedown, enable Utils.setItemVisible( menu, R.id.games_group_movedown, enable
&& (selGroupPos + 1) < groupCount ); && (selGroupPos + 1) < groupCount );