From e13eebaf0b635d7b5f1ced97d06d3391046ba220 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 26 Nov 2024 20:38:00 -0600 Subject: [PATCH] [ox/std] Cleanup an unsafe buffer --- deps/ox/src/ox/std/fmt.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/ox/src/ox/std/fmt.hpp b/deps/ox/src/ox/std/fmt.hpp index bc8d9a49..a7558c1c 100644 --- a/deps/ox/src/ox/std/fmt.hpp +++ b/deps/ox/src/ox/std/fmt.hpp @@ -81,16 +81,16 @@ class FmtArg { private: static constexpr auto DataSz = 23; - char dataStr[DataSz] = {}; + ox::Array dataStr{}; template - constexpr StringView sv(const T &v, char *dataStr) noexcept { + constexpr StringView sv(const T &v, ox::Span dataStr) noexcept { if constexpr(is_bool_v) { return v ? "true" : "false"; } else if constexpr(is_integer_v) { - ox::CharBuffWriter w(dataStr, DataSz); + ox::CharBuffWriter w(dataStr.data(), DataSz); std::ignore = ox::writeItoa(v, w); - return dataStr; + return dataStr.data(); } else { return toStringView(v); }