Skip to content

Commit 36b0954

Browse files
authored
Merge pull request #898 from cppalliance/overread
Set width of istream
2 parents be7676b + 13e0070 commit 36b0954

File tree

1 file changed

+1
-1
lines changed
  • include/boost/decimal/detail

1 file changed

+1
-1
lines changed

include/boost/decimal/detail/io.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ auto operator>>(std::basic_istream<charT, traits>& is, DecimalType& d)
3737
-> std::enable_if_t<detail::is_decimal_floating_point_v<DecimalType>, std::basic_istream<charT, traits>&>
3838
{
3939
charT t_buffer[1024] {}; // What should be an unreasonably high maximum
40-
is >> t_buffer;
40+
is >> std::setw(1023) >> t_buffer;
4141

4242
char buffer[1024] {};
4343

0 commit comments

Comments
 (0)