From f59095e72033444e3d1c84150d61192cffffa10c Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 30 Aug 2024 19:44:15 -0500 Subject: [PATCH] [ox/std] Fix itoa result length calculation (synced from f8aa60e4c1fa5137c18099ba854b148a0f8d6304) --- src/ox/std/istring.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ox/std/istring.hpp b/src/ox/std/istring.hpp index 8c1d996c9..7ffee5e49 100644 --- a/src/ox/std/istring.hpp +++ b/src/ox/std/istring.hpp @@ -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; }();