diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 97126b3bae5..a8a0edcf3cd 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2004-02-08 Paolo Carlini + + * include/bits/basic_string.tcc (assign(const _CharT*, size_type)): + When working in place remember to set the state to sharable + (otherwise, _M_mutate does it). + 2004-02-08 Bernardo Innocenti * include/bits/allocator.h, include/bits/basic_ios.h, diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index 729b86cca0e..4a79333ca87 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -273,6 +273,7 @@ namespace std traits_type::copy(_M_data(), __s, __n); else if (__pos) traits_type::move(_M_data(), __s, __n); + _M_rep()->_M_set_sharable(); _M_rep()->_M_length = __n; _M_data()[__n] = _Rep::_S_terminal; // grr. return *this;