diff --git a/src/string_func_extra.h b/src/string_func_extra.h index 1dc21dd9bb..c6df7ab588 100644 --- a/src/string_func_extra.h +++ b/src/string_func_extra.h @@ -72,7 +72,11 @@ inline bool IntFromChars(const char* first, const char* last, T& value) } } if (start == first) return false; - value = negative ? -out : out; + if (std::is_signed::value) { + value = negative ? -out : out; + } else { + value = out; + } return true; }