diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-01 16:01:04 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-01 16:01:04 -0700 |
commit | 00c2e03551a61ca76bdb303f1c007845f8a6dbd6 (patch) | |
tree | 51a3fb38eff156561441960606533fd0c1be71df /system/lib/libcxx/strstream.cpp | |
parent | 36600f34ef0ec2cf75165be3753567e256f514db (diff) | |
parent | 2787d1f7d01afb598ed56c4d52dab876e0a34a74 (diff) |
Merge pull request #1009 from waywardmonkeys/another-libcxx-update1.3.6
Another libcxx update
Diffstat (limited to 'system/lib/libcxx/strstream.cpp')
-rw-r--r-- | system/lib/libcxx/strstream.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/system/lib/libcxx/strstream.cpp b/system/lib/libcxx/strstream.cpp index 8cd19e6a..518422bd 100644 --- a/system/lib/libcxx/strstream.cpp +++ b/system/lib/libcxx/strstream.cpp @@ -158,6 +158,8 @@ strstreambuf::overflow(int_type __c) return int_type(EOF); streamsize old_size = (epptr() ? epptr() : egptr()) - eback(); streamsize new_size = max<streamsize>(__alsize_, 2*old_size); + if (new_size == 0) + new_size = __default_alsize; char* buf = nullptr; if (__palloc_) buf = static_cast<char*>(__palloc_(static_cast<size_t>(new_size))); |