X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libstdc%2B%2B-v3%2Finclude%2Fbits%2Fsstream.tcc;h=86daa6d3ca3149fc4c82df2c02f55ffb04b4a8b4;hb=2cf9260fed736d58b913d6289dbe0c849d8a3414;hp=76cda2974eed72c77516ecd4e977c6927e2ba5b9;hpb=8a89c0ca8df63168d4de4d66903aa899aa0dab60;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libstdc++-v3/include/bits/sstream.tcc b/libstdc++-v3/include/bits/sstream.tcc index 76cda2974ee..86daa6d3ca3 100644 --- a/libstdc++-v3/include/bits/sstream.tcc +++ b/libstdc++-v3/include/bits/sstream.tcc @@ -109,7 +109,8 @@ namespace std const __size_type __len = std::min(__opt_len, __max_size); __string_type __tmp; __tmp.reserve(__len); - __tmp.assign(_M_string.data(), this->epptr() - this->pbase()); + if (this->pbase()) + __tmp.assign(this->pbase(), this->epptr() - this->pbase()); _M_string.swap(__tmp); _M_sync(const_cast(_M_string.data()), this->gptr() - this->eback(), this->pptr() - this->pbase()); @@ -205,7 +206,7 @@ namespace std this->gbump((__beg + __pos) - this->gptr()); if (__testout) this->pbump((__beg + __pos) - this->pptr()); - __ret = pos_type(off_type(__pos)); + __ret = __sp; } } return __ret;