diff --git a/libcxx/include/locale b/libcxx/include/locale index fa2620d883598..b206bf8f162f9 100644 --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -1277,7 +1277,7 @@ _LIBCPP_HIDE_FROM_ABI inline _OutputIterator num_put<_CharT, _OutputIterator>::_ } auto __res = std::__to_chars_integral(__buffer_ptr, __char_buffer + __buffer_size, __uval, __base); - _LIBCPP_ASSERT_INTERNAL(__res.__ec == std::errc(), "to_chars: invalid maximum buffer size computed?"); + _LIBCPP_ASSERT_INTERNAL(__res.__ec == std::errc(0), "to_chars: invalid maximum buffer size computed?"); // Make letters uppercase if (__flags & ios_base::hex && __flags & ios_base::uppercase) {