Avoid Array out of bound execption
This commit is contained in:
parent
7ae3a73193
commit
fb1f1a6cb9
1 changed files with 3 additions and 0 deletions
|
@ -1073,6 +1073,9 @@ public class OsmandSettings {
|
|||
if (ip.trim().length() > 0) {
|
||||
list.addAll(Arrays.asList(ip.split("--")));
|
||||
}
|
||||
while(list.size() > sz) {
|
||||
list.remove(list.size() - 1);
|
||||
}
|
||||
while(list.size() < sz) {
|
||||
list.add("");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue