Skip to content

Commit 99243b0

Browse files
committed
fix: add unsigned short support in table deserialisation
While it seems that this wasn't needed in the lifetime of this library so far, it seems weird not to support the full protocol as stated on the RabbitMQ website (including errata). This commit adds parsing support for the 'u' case, which should ensure the library conforms fully to the protocol in those few edge cases where it is still needed. Inspired by: #662
1 parent ab4c7c2 commit 99243b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

projects/RabbitMQ.Client/client/impl/WireFormatting.Read.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ static object ReadFieldValueSlow(ReadOnlySpan<byte> span, out int bytesRead)
130130
case 's':
131131
bytesRead = 3;
132132
return NetworkOrderDeserializer.ReadInt16(slice);
133+
case 'u':
134+
bytesRead = 3;
135+
return NetworkOrderDeserializer.ReadUInt16(slice);
133136
case 'T':
134137
bytesRead = 1 + ReadTimestamp(slice, out var timestamp);
135138
return timestamp;

0 commit comments

Comments
 (0)