Skip to content

Commit 02583a1

Browse files
authored
Merge pull request boostorg#291 from boostorg/sign
Fix sign conversion when Integer is a signed type
2 parents f3d021b + 8d7c176 commit 02583a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/boost/charconv/detail/from_chars_integer_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ BOOST_CXX14_CONSTEXPR from_chars_result from_chars_integer_impl(const char* firs
155155
else
156156
#endif
157157
{
158-
overflow_value = (std::numeric_limits<Integer>::max)();
159-
max_digit = (std::numeric_limits<Integer>::max)();
158+
overflow_value = static_cast<Unsigned_Integer>((std::numeric_limits<Integer>::max)());
159+
max_digit = static_cast<Unsigned_Integer>((std::numeric_limits<Integer>::max)());
160160
}
161161

162162
if (is_negative)

0 commit comments

Comments
 (0)