Permalink
Browse files

Fixed WindowsRuntimeBuffer ctor with capacity

  • Loading branch information...
1 parent 51c56a6 commit 677c3b41335a893ac62485a5676027ae53e0ecad @ermau ermau committed Sep 23, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 WinRT.NET/System/Runtime/InteropServices/WindowsRuntime/WindowsRuntimeBuffer.cs
@@ -52,8 +52,8 @@ internal WindowsRuntimeBuffer (byte[] buffer, int offset, int length)
internal WindowsRuntimeBuffer (byte[] buffer, int offset, int length, int capacity)
{
- byte[] buff = new byte[length];
- Array.Copy (buffer, offset, buff, 0, capacity);
+ byte[] buff = new byte[capacity];
+ Array.Copy (buffer, offset, buff, 0, length);
this.Buffer = buff;
this.length = (uint)length;
}

0 comments on commit 677c3b4

Please sign in to comment.