Skip to content

Commit

Permalink
Fix marshaller
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse committed Feb 9, 2024
1 parent 6671471 commit 3ad06d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wpiutil/Marshal/WPIStringMarshaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void FromManaged(WpiString managed, Span<byte> callerAllocatedBuffer)
}
int byteCount = Encoding.UTF8.GetBytes(strBuf, callerAllocatedBuffer);
Debug.Assert(byteCount == exactByteCount);
data = callerAllocatedBuffer;
data = callerAllocatedBuffer[..byteCount];
}
else
{
Expand Down

0 comments on commit 3ad06d8

Please sign in to comment.