Fix int overflow
This commit is contained in:
parent
43f087e51b
commit
b974646749
@ -115,11 +115,11 @@ func webHandlerTelegramBot(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
} else if telegramIsCommand(request.Message.Text, "whois") {
|
} else if telegramIsCommand(request.Message.Text, "whois") {
|
||||||
if setting.netSpecificMode == "dn42" {
|
if setting.netSpecificMode == "dn42" {
|
||||||
targetNumber, err := strconv.Atoi(target)
|
targetNumber, err := strconv.ParseUint(target, 10, 64)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if targetNumber < 10000 {
|
if targetNumber < 10000 {
|
||||||
targetNumber += 4242420000
|
targetNumber += 4242420000
|
||||||
target = strconv.Itoa(targetNumber)
|
target = strconv.FormatUint(targetNumber, 10)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user