~ruther/NosSmooth

2e385dc04fc64638880043e42fa28d0a3fd4fbf3 — František Boháček 3 years ago c4efc65
feat: parse NameString as null if it is "-"
1 files changed, 5 insertions(+), 0 deletions(-)

M Core/NosSmooth.Packets/Converters/Common/NameStringConverter.cs
M Core/NosSmooth.Packets/Converters/Common/NameStringConverter.cs => Core/NosSmooth.Packets/Converters/Common/NameStringConverter.cs +5 -0
@@ 37,6 37,11 @@ public class NameStringConverter : BaseTypeConverter<NameString>
            return Result<NameString?>.FromError(tokenResult);
        }

        if (tokenResult.Entity.Token == "-")
        {
            return Result<NameString?>.FromSuccess(null);
        }

        return NameString.FromPacket(tokenResult.Entity.Token);
    }
}
\ No newline at end of file

Do not follow this link