From b1429b9cb483b3aaa24f428a8c3c3d18ef51e7dd Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 4 Dec 2012 22:15:04 +0100 Subject: Fix crash of settings if verb > 5 from the parsed configuration --HG-- extra : rebase_source : 895a74f802b9e1e38014f6c29ec24a4149d41df3 --- src/de/blinkt/openvpn/Settings_Obscure.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/de') diff --git a/src/de/blinkt/openvpn/Settings_Obscure.java b/src/de/blinkt/openvpn/Settings_Obscure.java index f7a63043..c93944fa 100644 --- a/src/de/blinkt/openvpn/Settings_Obscure.java +++ b/src/de/blinkt/openvpn/Settings_Obscure.java @@ -69,7 +69,12 @@ public class Settings_Obscure extends OpenVpnPreferencesFragment implements OnPr mLogverbosity.setDefaultValue(newValue); //This is idiotic. int i =Integer.parseInt((String) newValue); - mLogverbosity.setSummary(mLogverbosity.getEntries()[i]); + + // verb >= 5 is not supported by the chooser + if(i < mLogverbosity.getEntries().length ) + mLogverbosity.setSummary(mLogverbosity.getEntries()[i]); + else + mLogverbosity.setSummary(String.format("debug verbosity: %d",i)); } return true; -- cgit v1.2.3