Fix default end value of the rangeItem

This commit is contained in:
ayooh 2024-07-13 17:45:32 +08:00 committed by GitHub
parent c8caac9f67
commit 6144c8e340
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,7 +39,7 @@ func NewPortRangeItem(isSource bool, rangeList []string) (*PortRangeItem, error)
} }
} }
if subIndex == len(portRange)-1 { if subIndex == len(portRange)-1 {
end = 0xFF end = 0xFFFF
} else { } else {
end, err = strconv.ParseUint(portRange[subIndex+1:], 10, 16) end, err = strconv.ParseUint(portRange[subIndex+1:], 10, 16)
if err != nil { if err != nil {