Skip to content

Commit bb37aa2

Browse files
committed
fix conversion between integer types
1 parent 589f3a4 commit bb37aa2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

announce.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type AnnounceResponse struct {
2222

2323
func announce(w http.ResponseWriter, r *http.Request) {
2424
query := r.URL.Query()
25-
port, err := strconv.Atoi(query.Get("port"))
25+
port, err := strconv.ParseUint(query.Get("port"), 10, 16)
2626
if err != nil {
2727
http.Error(w, "port missing", 400)
2828
return

0 commit comments

Comments
 (0)