locale_facets.tcc (money_put::do_put(..., long double)): Use the basic_string constru...
authorPaolo Carlini <pcarlini@suse.de>
Thu, 22 Jan 2004 14:25:37 +0000 (14:25 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 22 Jan 2004 14:25:37 +0000 (14:25 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets.tcc

index 15973591c7e24ff53d707b22875d218e3832a8d7..ca2e835059b6cc26c8a262f119fb4c593da40dfb 100644 (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
index 4dc3bb4f6b225e5189e2477c9c91c240b68290d1..c0598892a5c95f5e90c81ac95c811327b0d43a68 100644 (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); 
     }