diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-12-04 22:15:04 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-12-04 22:15:04 +0100 |
commit | fb0d326ab51d17e6860fec910b1a24fb7717462c (patch) | |
tree | 2feb7bd7055248cc24b9e6668354f7c2d70eeb96 /src/de/blinkt/openvpn/Settings_Obscure.java | |
parent | 0681b469fe26a431437cea1449f42850abb1f545 (diff) |
Fix crash of settings if verb > 5 from the parsed configuration
Diffstat (limited to 'src/de/blinkt/openvpn/Settings_Obscure.java')
-rw-r--r-- | src/de/blinkt/openvpn/Settings_Obscure.java | 7 |
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; |