diff --git a/OutlookFileDrag/DataObjectHelper.cs b/OutlookFileDrag/DataObjectHelper.cs index 3242d2f..97bb8cd 100644 --- a/OutlookFileDrag/DataObjectHelper.cs +++ b/OutlookFileDrag/DataObjectHelper.cs @@ -392,7 +392,7 @@ private static void ReadHGlobalIntoStream(IntPtr handle, Stream stream) { //Copy buffer length or remaining length, whichever is smaller bytesToCopy = Math.Min(buffer.Length, length - offset); - Marshal.Copy(source, buffer, 0, bytesToCopy); + Marshal.Copy(source + offset, buffer, 0, bytesToCopy); stream.Write(buffer, 0, bytesToCopy); } }