mirror of
https://github.com/fumiama/terasu-cloudflared.git
synced 2026-06-20 02:30:27 +08:00
TUN-6811: Ping group range should be parsed as int32
This commit is contained in:
@@ -81,11 +81,11 @@ func checkInPingGroup() error {
|
|||||||
// Example content: 999 59999
|
// Example content: 999 59999
|
||||||
found := findGroupIDRegex.FindAll(file, 2)
|
found := findGroupIDRegex.FindAll(file, 2)
|
||||||
if len(found) == 2 {
|
if len(found) == 2 {
|
||||||
groupMin, err := strconv.ParseUint(string(found[0]), 10, 16)
|
groupMin, err := strconv.ParseInt(string(found[0]), 10, 32)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "failed to determine minimum ping group ID")
|
return errors.Wrapf(err, "failed to determine minimum ping group ID")
|
||||||
}
|
}
|
||||||
groupMax, err := strconv.ParseUint(string(found[1]), 10, 16)
|
groupMax, err := strconv.ParseInt(string(found[1]), 10, 32)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "failed to determine minimum ping group ID")
|
return errors.Wrapf(err, "failed to determine minimum ping group ID")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user