[ox/std] Fix itoa result length calculation

This commit is contained in:
Gary Talent 2024-08-30 19:44:15 -05:00
parent 3ead305f51
commit f8aa60e4c1

View File

@ -234,12 +234,16 @@ constexpr auto itoa(Integer v) noexcept {
switch (sizeof(Integer)) { switch (sizeof(Integer)) {
case 1: case 1:
out = 3; out = 3;
break;
case 2: case 2:
out = 5; out = 5;
break;
case 4: case 4:
out = 10; out = 10;
break;
case 8: case 8:
out = 21; out = 21;
break;
} }
return out + ox::is_signed_v<Integer>; return out + ox::is_signed_v<Integer>;
}(); }();