From 33c5a25bed0fe2f49c4697050509ed3faf7699eb Mon Sep 17 00:00:00 2001 From: sven-herrmann <47666325+sven-herrmann@users.noreply.github.com> Date: Tue, 25 May 2021 16:38:31 +0200 Subject: [PATCH] now using detail::to_unsigned for the cast --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 9b5f4365..9f1178bd 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -550,7 +550,7 @@ FMT_CONSTEXPR inline size_t compute_width(string_view s) { size_t* count; FMT_CONSTEXPR void operator()(uint32_t cp, int error) const { *count += - size_t(1 + + detail::to_unsigned(1 + (error == 0 && cp >= 0x1100 && (cp <= 0x115f || // Hangul Jamo init. consonants cp == 0x2329 || // LEFT-POINTING ANGLE BRACKET〈