From 3b5bc3a786427b5875852dfff7e3e04b234c443e Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 13 Nov 2013 18:39:03 -0800 Subject: [PATCH] fix OOB per http://stackoverflow.com/questions/12133404/indexoutofboundsexception-in-a-baseexpandablelistadapter-implementing-sectionind --- .../src/org/eehouse/android/xw4/DictBrowseActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictBrowseActivity.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictBrowseActivity.java index e982d6271..a75be877b 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictBrowseActivity.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DictBrowseActivity.java @@ -128,6 +128,9 @@ public class DictBrowseActivity extends XWListActivity // SectionIndexer public int getPositionForSection( int section ) { + if ( section >= m_indices.length ) { + section = m_indices.length - 1; + } return m_indices[section]; }