mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
epr config - int parse bug
This commit is contained in:
parent
78bf6fbe4c
commit
ed83058f4e
@ -142,13 +142,13 @@ func (s *WebRTC) Set() {
|
|||||||
max := uint16(59100)
|
max := uint16(59100)
|
||||||
epr := viper.GetString("epr")
|
epr := viper.GetString("epr")
|
||||||
ports := strings.SplitN(epr, "-", -1)
|
ports := strings.SplitN(epr, "-", -1)
|
||||||
if len(ports[0]) > 1 {
|
if len(ports) > 1 {
|
||||||
start, err := strconv.ParseUint(ports[0], 16, 16)
|
start, err := strconv.ParseUint(ports[0], 10, 16)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
min = uint16(start)
|
min = uint16(start)
|
||||||
}
|
}
|
||||||
|
|
||||||
end, err := strconv.ParseUint(ports[1], 16, 16)
|
end, err := strconv.ParseUint(ports[1], 10, 16)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
max = uint16(end)
|
max = uint16(end)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user