Avoid Array out of bound execption

This commit is contained in:
Victor Shcherb 2013-07-22 00:58:19 +02:00
parent 7ae3a73193
commit fb1f1a6cb9

View file

@ -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("");
}