This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] libstdc++/66464 fix codecvt_utf16<char32_t>::max_length()


Fixes a silly copy&paste error.

Tested powerpc64le-linux, committing to trunk and gcc-5-branch.
commit c7bb5649cc5706117a724dff484ecae8382279e1
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Jun 12 10:44:50 2015 +0100

    	PR libstdc++/66464
    	* src/c++11/codecvt.cc (codecvt_utf16_base<char32_t>::do_max_length):
    	Return 4 not 3.

diff --git a/libstdc++-v3/src/c++11/codecvt.cc b/libstdc++-v3/src/c++11/codecvt.cc
index 2a11ca3..6b82aa8 100644
--- a/libstdc++-v3/src/c++11/codecvt.cc
+++ b/libstdc++-v3/src/c++11/codecvt.cc
@@ -1124,7 +1124,7 @@ do_length(state_type&, const extern_type* __from,
 
 int
 __codecvt_utf16_base<char32_t>::do_max_length() const throw()
-{ return 3; }
+{ return 4; }
 
 #ifdef _GLIBCXX_USE_WCHAR_T
 // Define members of codecvt_utf16<wchar_t> base class implementation.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]