summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-12-04 22:15:04 +0100
committerArne Schwabe <arne@rfc2549.org>2012-12-04 22:15:04 +0100
commitb1429b9cb483b3aaa24f428a8c3c3d18ef51e7dd (patch)
treec34dab50ba488ea92135567329044316ef6fce26 /src/de/blinkt/openvpn
parent36c03ed1b2f0e06c1a247a693257f4595c53ae69 (diff)
Fix crash of settings if verb > 5 from the parsed configuration
--HG-- extra : rebase_source : 895a74f802b9e1e38014f6c29ec24a4149d41df3
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r--src/de/blinkt/openvpn/Settings_Obscure.java7
1 files changed, 6 insertions, 1 deletions
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;