[ox/std] Fix itoa result length calculation
This commit is contained in:
parent
3ead305f51
commit
f8aa60e4c1
4
deps/ox/src/ox/std/istring.hpp
vendored
4
deps/ox/src/ox/std/istring.hpp
vendored
@ -234,12 +234,16 @@ constexpr auto itoa(Integer v) noexcept {
|
||||
switch (sizeof(Integer)) {
|
||||
case 1:
|
||||
out = 3;
|
||||
break;
|
||||
case 2:
|
||||
out = 5;
|
||||
break;
|
||||
case 4:
|
||||
out = 10;
|
||||
break;
|
||||
case 8:
|
||||
out = 21;
|
||||
break;
|
||||
}
|
||||
return out + ox::is_signed_v<Integer>;
|
||||
}();
|
||||
|
Loading…
Reference in New Issue
Block a user