From 5b6a5279f4b77e6491ff96cf4dc845f48e32cceb Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Sat, 12 Oct 2024 14:56:09 +0300 Subject: [PATCH] Fix --- src/BUTR.CrashReport.Renderer.ImGui/ImGui/CmGui.Methods.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/BUTR.CrashReport.Renderer.ImGui/ImGui/CmGui.Methods.cs b/src/BUTR.CrashReport.Renderer.ImGui/ImGui/CmGui.Methods.cs index ca4a5d0..0d6bf18 100644 --- a/src/BUTR.CrashReport.Renderer.ImGui/ImGui/CmGui.Methods.cs +++ b/src/BUTR.CrashReport.Renderer.ImGui/ImGui/CmGui.Methods.cs @@ -40,8 +40,8 @@ public bool InputTextMultiline(ReadOnlySpan label, Span input, int l [MethodImpl(MethodImplOptions.AggressiveInlining | AggressiveOptimization)] public void Text(bool fmt) { - var @true = "true"u8; - var @false = "false"u8; + var @true = "true\0"u8; + var @false = "false\0"u8; Text(fmt ? @true : @false); } @@ -69,6 +69,7 @@ public void TextSameLine(ref readonly DateTimeOffset value) { Span valueUtf8 = stackalloc byte[64]; Utf8Formatter.TryFormat(value, valueUtf8, out var written, new StandardFormat('O')); + valueUtf8[written] = 0; Text(valueUtf8.Slice(0, written)); SameLine(0, 0); }