From 2e385dc04fc64638880043e42fa28d0a3fd4fbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Fri, 31 Dec 2021 23:37:55 +0100 Subject: [PATCH] feat: parse NameString as null if it is "-" --- .../Converters/Common/NameStringConverter.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/NosSmooth.Packets/Converters/Common/NameStringConverter.cs b/Core/NosSmooth.Packets/Converters/Common/NameStringConverter.cs index 00e6bb8..030a90b 100644 --- a/Core/NosSmooth.Packets/Converters/Common/NameStringConverter.cs +++ b/Core/NosSmooth.Packets/Converters/Common/NameStringConverter.cs @@ -37,6 +37,11 @@ public class NameStringConverter : BaseTypeConverter return Result.FromError(tokenResult); } + if (tokenResult.Entity.Token == "-") + { + return Result.FromSuccess(null); + } + return NameString.FromPacket(tokenResult.Entity.Token); } } \ No newline at end of file -- 2.49.0