Hard code the base of the string to decimal

pull/24720/head
Lidi Zheng 4 years ago
parent cc03415b78
commit ab96b012ee
  1. 2
      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<int>(result);
}

Loading…
Cancel
Save