From c6579171c82725fabb83c0a35bfb0d11dfb24554 Mon Sep 17 00:00:00 2001 From: AZero13 Date: Fri, 26 Dec 2025 22:54:29 -0500 Subject: [PATCH] format: we need to include the last byte We skip the last byte, which I guess happens to work for us, but is still improper. Also use int because unsigned char is bad for ARM64 and cannot exceed the value of an unsigned char anyway. --- stl/src/format.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/src/format.cpp b/stl/src/format.cpp index 67a91356a9d..96527ed68dd 100644 --- a/stl/src/format.cpp +++ b/stl/src/format.cpp @@ -31,7 +31,7 @@ extern "C" [[nodiscard]] __std_win_error __stdcall __std_get_cvt( break; } - for (unsigned char _First = _Info.LeadByte[_Idx], _Last = _Info.LeadByte[_Idx + 1]; _First != _Last; ++_First) { + for (int _First = _Info.LeadByte[_Idx], _Last = _Info.LeadByte[_Idx + 1]; _First <= _Last; ++_First) { _Pcvt->_Isleadbyte[_First >> 3] |= 1u << (_First & 0b111u); } }