Skip to content

Commit c657917

Browse files
committed
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.
1 parent cbe2ee9 commit c657917

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stl/src/format.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern "C" [[nodiscard]] __std_win_error __stdcall __std_get_cvt(
3131
break;
3232
}
3333

34-
for (unsigned char _First = _Info.LeadByte[_Idx], _Last = _Info.LeadByte[_Idx + 1]; _First != _Last; ++_First) {
34+
for (int _First = _Info.LeadByte[_Idx], _Last = _Info.LeadByte[_Idx + 1]; _First <= _Last; ++_First) {
3535
_Pcvt->_Isleadbyte[_First >> 3] |= 1u << (_First & 0b111u);
3636
}
3737
}

0 commit comments

Comments
 (0)