Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
utpilla committed Nov 7, 2023
1 parent 011189f commit f1e0492
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public static int Serialize(byte[] buffer, int cursor, object obj)
#if NET6_0_OR_GREATER
case ISpanFormattable v:
tmp = stackalloc char[MAX_STACK_ALLOC_SIZE_IN_BYTES / sizeof(char)];
if (v.TryFormat(tmp, out charsWritten, default, CultureInfo.InvariantCulture) && charsWritten > 0)
if (v.TryFormat(tmp, out charsWritten, default, CultureInfo.InvariantCulture))
{
return SerializeString(buffer, cursor, tmp.Slice(0, charsWritten));
}
Expand Down

0 comments on commit f1e0492

Please sign in to comment.