Skip to content

Commit

Permalink
Fix empty string writing
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchLeaders committed Jan 13, 2024
1 parent 3626d65 commit e2147b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/BymlLibrary/Yaml/YamlEmitter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ public void EmitNode(in ImmutableByml byml, in ImmutableByml root)

public unsafe void EmitString(Span<byte> str)
{
if (str.IsEmpty) {
if (str.IsEmpty || str[0] == 0x0) {
Builder.Append("''");
return;
}

if (str.ContainsAny(SpecialChars)) {
Expand Down

0 comments on commit e2147b6

Please sign in to comment.