This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
patch for fstream.cc
- To: libstdc++@sourceware.cygnus.com
- Subject: patch for fstream.cc
- From: "Vadim Egorov" <egorovv@my-deja.com>
- Date: Thu, 03 Jun 1999 15:19:05 -0700
- Attachments: fstream.cc.diff
- Organization: deja.com Mail (http://www.my-deja.com:80)
Hello,
When I tryed to use std::wcout in simple test like this:
std::wcout << L"hellow world" << endl ;
std::wcout << L"hellow world" << endl ;
I got a lot of garbage in output.
I think I managed to locate the source of error.
Here is a small patch to fix the problem.
Regards
Vadim
--------------------------------------------
Vadim Egorov
egorovv@1c.ru
--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.
1999-06-04 Vadim Egorov <egorovv@1c.ru>
* bits/fstream.tcc (_M_really_overflow): Fixed number of
characters to write to file
Index: fstream.tcc
===================================================================
RCS file: /cvs/libstdc++/libstdc++/bits/fstream.tcc,v
retrieving revision 1.21
diff -c -r1.21 fstream.tcc
*** fstream.tcc 1999/06/03 00:47:35 1.21
--- fstream.tcc 1999/06/03 21:53:05
***************
*** 377,383 ****
traits_type::copy(__pbuf, this->pbase(), __plen);
char_type* __pend;
! int __conv_len = __plen * sizeof(char_type);
char __conv_buf[__conv_len];
char* __conv_end;
--- 377,383 ----
traits_type::copy(__pbuf, this->pbase(), __plen);
char_type* __pend;
! int __conv_len = __plen * sizeof(char);
char __conv_buf[__conv_len];
char* __conv_end;