From ab96b012eee330af2ca78051d8deccbc3561cd6d Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 10 Nov 2020 17:41:17 -0800 Subject: [PATCH] Hard code the base of the string to decimal --- src/core/lib/gpr/string.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/gpr/string.cc b/src/core/lib/gpr/string.cc index d303423c0d1..61b04197a96 100644 --- a/src/core/lib/gpr/string.cc +++ b/src/core/lib/gpr/string.cc @@ -216,7 +216,7 @@ int int64_ttoa(int64_t value, char* string) { int gpr_parse_nonnegative_int(const char* value) { char* end; - long result = strtol(value, &end, 0); + long result = strtol(value, &end, 10); if (*end != '\0' || result < 0 || result > INT_MAX) return -1; return static_cast(result); }