Fixed #9586 by detecting if option list includes /0 or not

(cherry picked from commit 7ec80e763f)
This commit is contained in:
Steve Beaver 2019-07-10 13:26:06 -04:00 committed by jim-p
parent 2c29eaf921
commit aa08527dc9

View File

@ -184,7 +184,14 @@ function setMasks() {
if (input.val() == "")
return;
while (select.options.length > max)
// Sometimes the mask includes '0' (e.g. for VPNs), sometimes it does not
if (select.options[select.options.length - 1].value == 0) {
var mm = max + 1;
} else {
var mm = max;
}
while (select.options.length > mm)
select.remove(0);
if (select.options.length < max) {