locale_facets.tcc (money_put::do_put(..., long double)): Use the basic_string constructor for char arrays...

2004-01-22  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc
	(money_put::do_put(..., long double)): Use the basic_string
	constructor for char arrays, not that for C-strings, to pass
	__digits to do_put(..., const string_type&): __ws isn't
	null-terminated.

From-SVN: r76355
This commit is contained in:
Paolo Carlini 2004-01-22 14:25:37 +00:00 committed by Paolo Carlini
parent 7bb9b33b3b
commit ba46e66a8b
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2004-01-22 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc
(money_put::do_put(..., long double)): Use the basic_string
constructor for char arrays, not that for C-strings, to pass
__digits to do_put(..., const string_type&): __ws isn't
null-terminated.
2004-01-22 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (_M_replace_safe): Change

View File

@ -1385,7 +1385,7 @@ namespace std
_CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT)
* __cs_size));
__ctype.widen(__cs, __cs + __len, __ws);
string_type __digits(__ws);
const string_type __digits(__ws, __len);
return this->do_put(__s, __intl, __io, __fill, __digits);
}