This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch for fstream.cc


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;
  	  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]