localename.cc (locale::_Impl::_Impl): Slightly improve the algorithm used to name...
authorPaolo Carlini <pcarlini@suse.de>
Mon, 28 Jun 2004 11:18:03 +0000 (11:18 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 28 Jun 2004 11:18:03 +0000 (11:18 +0000)
2004-06-28  Paolo Carlini  <pcarlini@suse.de>

* src/localename.cc (locale::_Impl::_Impl): Slightly improve
the algorithm used to name the categories.

From-SVN: r83778

libstdc++-v3/ChangeLog
libstdc++-v3/src/localename.cc

index 904d1847c6ac99b767947f7d28ee075c5141fa45..d0c64e42e8b5e6a54ef0ab4a1cbb861e5f055a35 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-28  Paolo Carlini  <pcarlini@suse.de>
+
+       * src/localename.cc (locale::_Impl::_Impl): Slightly improve
+       the algorithm used to name the categories.
+
 2004-06-28  Paolo Bonzini  <bonzini@gnu.org>
 
        * include/Makefile.am: Give a .gch extension to
index e90e84734e8508c1d484d898e0a42de64e080c54..f9c7a82f096e00b83b0e0955bc479c236f75ce6b 100644 (file)
@@ -209,11 +209,11 @@ namespace std
          }
        else
          {
-           const char* __beg = __s;
+           const char* __end = __s;
            for (size_t __i = 0; __i < _S_categories_size; ++__i)
              {
-               __beg = std::strchr(__beg, '=') + 1;
-               const char* __end = std::strchr(__beg, ';');
+               const char* __beg = std::strchr(__end + 1, '=') + 1;
+               __end = std::strchr(__beg, ';');
                if (!__end)
                  __end = __s + __len;
                _M_names[__i] = new char[__end - __beg + 1];