]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Fix off-by-one error.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 24 Jan 2016 19:27:42 +0000 (20:27 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 24 Jan 2016 19:27:42 +0000 (20:27 +0100)
src/com/hughes/android/dictionary/DictionaryActivity.java

index bb749f82fc333ba587d07a9ce7cc2f226c343cbf..e0290b065eb1e8cc057e5091c6cdc170494df368 100644 (file)
@@ -777,7 +777,7 @@ public class DictionaryActivity extends ActionBarActivity {
             }
         } else {
             // Down
-            destIndexEntry = Math.min(tokenRow.referenceIndex + 1, index.sortedIndexEntries.size());
+            destIndexEntry = Math.min(tokenRow.referenceIndex + 1, index.sortedIndexEntries.size() - 1);
         }
         final Index.IndexEntry dest = index.sortedIndexEntries.get(destIndexEntry);
         Log.d(LOG, "onUpDownButton, destIndexEntry=" + dest.token);