Skip to content

Commit f7777e8

Browse files
Fix type of __pzero
1 parent 9d74f16 commit f7777e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libcxx/include/__format/format_arg_store.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ _LIBCPP_HIDE_FROM_ABI basic_format_arg<_Context> __create_format_arg(_Tp& __valu
199199
// Using std::size on a character array will add the NUL-terminator to the size.
200200
if constexpr (__is_bounded_array_of<_Dp, __context_char_type>) {
201201
const auto __pbegin = std::begin(__value);
202-
if (const _Dp* __pzero = char_traits<__context_char_type>::find(__pbegin, extent_v<_Dp>, __context_char_type{})) {
202+
if (const __context_char_type* const __pzero =
203+
char_traits<__context_char_type>::find(__pbegin, extent_v<_Dp>, __context_char_type{})) {
203204
return basic_format_arg<_Context>{
204205
__arg, basic_string_view<__context_char_type>{__pbegin, static_cast<size_t>(__pzero - __pbegin)}};
205206
} else {

0 commit comments

Comments
 (0)