Make /0 CIDR be parsed as IP

This commit is contained in:
y67h41
2023-08-24 17:36:49 +08:00
committed by GitHub
parent 99307ab8f0
commit 6a255cdfa4

View File

@@ -178,7 +178,7 @@ object Utils {
//CIDR
if (addr.indexOf("/") > 0) {
val arr = addr.split("/")
if (arr.count() == 2 && Integer.parseInt(arr[1]) > 0) {
if (arr.count() == 2 && Integer.parseInt(arr[1]) > -1) {
addr = arr[0]
}
}