Skip to content

Commit

Permalink
Update PrometheusSerializer.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jan 24, 2025
1 parent f5ead0b commit f6c8fba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ public static int WriteUnicodeNoEscape(byte[] buffer, int cursor, ushort ordinal
buffer[cursor++] = unchecked((byte)(0b_1100_0000 | (ordinal >> 6)));
buffer[cursor++] = unchecked((byte)(0b_1000_0000 | (ordinal & 0b_0011_1111)));
}
else // all other <= 0xFFFF which is ushort.MaxValue
else
{
// all other <= 0xFFFF which is ushort.MaxValue
buffer[cursor++] = unchecked((byte)(0b_1110_0000 | (ordinal >> 12)));
buffer[cursor++] = unchecked((byte)(0b_1000_0000 | ((ordinal >> 6) & 0b_0011_1111)));
buffer[cursor++] = unchecked((byte)(0b_1000_0000 | (ordinal & 0b_0011_1111)));
Expand Down

0 comments on commit f6c8fba

Please sign in to comment.