From 7ca2bbdb7e6db71bbc70ca2520602d0d89dd00c8 Mon Sep 17 00:00:00 2001 From: nooperation Date: Sun, 29 Jun 2025 01:10:10 -0400 Subject: [PATCH] Fix a bug in the SplitMultibyteString I added a little bit ago. Splitting an empty string should result in a list of a single empty string, not an empty list --- LibreMetaverse/AgentManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/LibreMetaverse/AgentManager.cs b/LibreMetaverse/AgentManager.cs index 0f69b533..2c77e8cc 100644 --- a/LibreMetaverse/AgentManager.cs +++ b/LibreMetaverse/AgentManager.cs @@ -1596,6 +1596,13 @@ namespace OpenMetaverse { throw new Exception("Split size must be at least 1 byte"); } + if (message.Length == 0) + { + return new List() + { + string.Empty + }; + } var messageParts = new List(); var messageBytes = System.Text.Encoding.UTF8.GetBytes(message);