mirror of
https://github.com/meehow/privtracker.git
synced 2026-09-03 07:24:24 +08:00
fix conversion between integer types
This commit is contained in:
@@ -22,7 +22,7 @@ type AnnounceResponse struct {
|
||||
|
||||
func announce(w http.ResponseWriter, r *http.Request) {
|
||||
query := r.URL.Query()
|
||||
port, err := strconv.Atoi(query.Get("port"))
|
||||
port, err := strconv.ParseUint(query.Get("port"), 10, 16)
|
||||
if err != nil {
|
||||
http.Error(w, "port missing", 400)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user