From: Paolo Carlini Date: Mon, 28 Jun 2004 11:18:03 +0000 (+0000) Subject: localename.cc (locale::_Impl::_Impl): Slightly improve the algorithm used to name... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d91a076cc696350b1256e791079d6de02af6d6e;p=gcc.git 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 --- 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];