Skip to content

Commit 7c54931

Browse files
committed
fix ReadShortStr reading from wrong position
1 parent 6ed0ce5 commit 7c54931

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public static unsafe string ReadShortstr(ReadOnlySpan<byte> span, out int bytesR
192192
if (span.Length >= byteCount + 1)
193193
{
194194
bytesRead = 1 + byteCount;
195-
fixed (byte* bytes = &span.GetPinnableReference())
195+
fixed (byte* bytes = &span.Slice(1).GetPinnableReference())
196196
{
197197
return Encoding.UTF8.GetString(bytes, byteCount);
198198
}

0 commit comments

Comments
 (0)