amitv87 / winusbnet

Automatically exported from code.google.com/p/winusbnet
Other
0 stars 0 forks source link

Write method of Pipe class with offset slices data written to device #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the Write method of Pipe with Offset
2. Data is chopped

The fix is to remove this block of code:
            if (offset != 0)
            {
                // Not the complete buffer, slice buffer
                byte[] newBuffer = new byte[length];
                Array.Copy(buffer, offset, newBuffer, 0, length);
                buffer = newBuffer;
            }

OR adjust the offset and length in the call to WritePipe of InternalDevice.

Original issue reported on code.google.com by devendra...@gmail.com on 27 Mar 2012 at 12:41

GoogleCodeExporter commented 9 years ago
Looks like old code that never got deleted. Fixed in source SVN and new binrary 
release (1.0.1) is available.

Thanks for reporting!

Original comment by madwizar...@gmail.com on 28 Mar 2012 at 9:22