Skip to content

Commit

Permalink
Merge pull request #16 from azat-archive/stringstream-__pbump-fix
Browse files Browse the repository at this point in the history
Fix incorrect __pbump() usage (do not use it for size_t type)
  • Loading branch information
alexey-milovidov authored Apr 17, 2023
2 parents 141322e + bc6bad1 commit 2aedf75
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libcxx/include/sstream
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,13 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::str(const string_type& __s)
const_cast<char_type*>(__str_.data()) + __str_.size());
if (__mode_ & (ios_base::app | ios_base::ate))
{
this->__pbump(__sz);
while (__sz > INT_MAX)
{
this->pbump(INT_MAX);
__sz -= INT_MAX;
}
if (__sz > 0)
this->pbump(__sz);
}
}
}
Expand Down

0 comments on commit 2aedf75

Please sign in to comment.