From d92c1edc266818ab202d3484d41c60b0165d7016 Mon Sep 17 00:00:00 2001 From: Tony Chen Date: Mon, 12 Apr 2021 23:43:10 +0800 Subject: [PATCH] fix incorrect conversion between integer types (#824) --- transport/http/binding/proto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/http/binding/proto.go b/transport/http/binding/proto.go index 4a9dd9947..69d06a3dc 100644 --- a/transport/http/binding/proto.go +++ b/transport/http/binding/proto.go @@ -137,7 +137,7 @@ func parseField(fd protoreflect.FieldDescriptor, value string) (protoreflect.Val } v := enum.Descriptor().Values().ByName(protoreflect.Name(value)) if v == nil { - i, err := strconv.Atoi(value) + i, err := strconv.ParseInt(value, 10, 32) if err != nil { return protoreflect.Value{}, fmt.Errorf("%q is not a valid value", value) }