diff options
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r-- | libstdc++-v3/include/std/codecvt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/include/std/codecvt b/libstdc++-v3/include/std/codecvt index d58a0ecd673..e4a7d5bbb60 100644 --- a/libstdc++-v3/include/std/codecvt +++ b/libstdc++-v3/include/std/codecvt @@ -148,7 +148,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: \ explicit \ _NAME(size_t __refs = 0) \ - : __ ## _NAME ## _base<_ELEM>(_Maxcode, _Mode, __refs) { } \ + : __ ## _NAME ## _base<_ELEM>(std::min(_Maxcode, 0x10fffful), \ + _Mode, __refs) \ + { } \ } template<typename _Elem> class __codecvt_utf8_base; |