This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
seek bug in stringstream?
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: seek bug in stringstream?
- From: larsbj at lyx dot org (Lars Gullik Bjønnes)
- Date: 01 Jun 2000 04:52:24 +0200
Since I got not reaction to this patch last time I sent it I'll resend
it now. I am _not_ sure that this is the correct fix, but it makes
tellp/seekoff for a stringstream behave closer to seekoff for
strstream and fstream (and ftell for that matter).
Index: sstream.tcc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/bits/sstream.tcc,v
retrieving revision 1.1
diff -u -u -p -r1.1 sstream.tcc
--- sstream.tcc 2000/04/21 20:33:28 1.1
+++ sstream.tcc 2000/06/01 02:47:45
@@ -123,7 +123,7 @@ namespace std {
bool __testout = __mode & ios_base::out && _M_mode & ios_base::out;
bool __testboth = __testin && __testout && __way != ios_base::cur;
- if (_M_buf_size && ((__testin != __testout) || __testboth))
+ if ((__testin != __testout) || __testboth)
{
char_type* __beg = _M_buf;
char_type* __curi = NULL;
Lgb
| Nathan Myers <ncm@cantrip.org> writes:
|
| | I agree with your assessment. Please send a patch.