From 2d91a076cc696350b1256e791079d6de02af6d6e Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 28 Jun 2004 11:18:03 +0000 Subject: [PATCH] localename.cc (locale::_Impl::_Impl): Slightly improve the algorithm used to name the categories. 2004-06-28 Paolo Carlini * src/localename.cc (locale::_Impl::_Impl): Slightly improve the algorithm used to name the categories. From-SVN: r83778 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/src/localename.cc | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 904d1847c6a..d0c64e42e8b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2004-06-28 Paolo Carlini + + * src/localename.cc (locale::_Impl::_Impl): Slightly improve + the algorithm used to name the categories. + 2004-06-28 Paolo Bonzini * include/Makefile.am: Give a .gch extension to diff --git a/libstdc++-v3/src/localename.cc b/libstdc++-v3/src/localename.cc index e90e84734e8..f9c7a82f096 100644 --- a/libstdc++-v3/src/localename.cc +++ b/libstdc++-v3/src/localename.cc @@ -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]; -- 2.30.2