diff options
author | Steven Shaw <steshaw@apache.org> | 2006-12-06 16:30:16 +0000 |
---|---|---|
committer | Steven Shaw <steshaw@apache.org> | 2006-12-06 16:30:16 +0000 |
commit | 28f7b5dac060ae6119fadc597c161bad01564d23 (patch) | |
tree | e42a49d5b189dc791b71656e80605b532e2e5648 /qpid/dotnet/Qpid.Buffer | |
parent | 6a2b83c8b06d05b0ca4406100e20b4f8de1e7413 (diff) | |
download | qpid-python-28f7b5dac060ae6119fadc597c161bad01564d23.tar.gz |
QPID-128 Missed a couple of things while porting Java client changes recently.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@483135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/dotnet/Qpid.Buffer')
-rw-r--r-- | qpid/dotnet/Qpid.Buffer/HeapByteBuffer.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qpid/dotnet/Qpid.Buffer/HeapByteBuffer.cs b/qpid/dotnet/Qpid.Buffer/HeapByteBuffer.cs index c54272b33f..ea3b11b60d 100644 --- a/qpid/dotnet/Qpid.Buffer/HeapByteBuffer.cs +++ b/qpid/dotnet/Qpid.Buffer/HeapByteBuffer.cs @@ -126,8 +126,11 @@ namespace Qpid.Buffer } public override byte[] ToByteArray() - { - return _underlyingData; + { + // Return copy of bytes remaining. + byte[] result = new byte[Remaining]; + Array.Copy(_underlyingData, _position, result, 0, Remaining); + return result; } private void CheckSpace(int size) |