From d22d6ce289eb732a338b962e358369b509caef8c Mon Sep 17 00:00:00 2001 From: RedworkDE <10944644+RedworkDE@users.noreply.github.com> Date: Wed, 13 Nov 2024 09:58:49 +0100 Subject: [PATCH] fix free without alloc --- ChatTwo/GameFunctions/Chat.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ChatTwo/GameFunctions/Chat.cs b/ChatTwo/GameFunctions/Chat.cs index 812670c..045d927 100755 --- a/ChatTwo/GameFunctions/Chat.cs +++ b/ChatTwo/GameFunctions/Chat.cs @@ -1,4 +1,4 @@ -using System.Text; +using System.Text; using ChatTwo.Code; using ChatTwo.GameFunctions.Types; using ChatTwo.Resources; @@ -467,12 +467,12 @@ internal sealed unsafe class Chat : IDisposable internal void SendTellUsingCommandInner(byte[] message) { - var mes = new Utf8String(message); + var mes = Utf8String.FromSequence(message); - RaptureShellModule.Instance()->ExecuteCommandInner(&mes, UIModule.Instance()); + RaptureShellModule.Instance()->ExecuteCommandInner(mes, UIModule.Instance()); RaptureAtkModule.Instance()->ClearFocus(); // Clear the focus of vanilla chat that was still active - mes.Dtor(true); + mes->Dtor(true); } internal void SendTell(TellReason reason, ulong contentId, string name, ushort homeWorld, byte[] message, string rawText)