edgar-mtz-e / slimdx

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

DataStream::ReadRange ignores 'offset'. #439

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
DataStream::ReadRange will always write to the beginning of the array 
provided to it, regardless of the value of the 'offset' parameter.

It is expected that the data will be written starting 'offset' elements 
into the array.

I patched this locally with;

302c302
<       pin_ptr<T> pinnedBuffer = &buffer[0];

---
>       pin_ptr<T> pinnedBuffer = &buffer[offset];

Which appears to be consistent with WriteRange.

The bounds checking logic seems to be correct as-is.

Original issue reported on code.google.com by corng...@gmail.com on 21 Feb 2009 at 12:50

GoogleCodeExporter commented 9 years ago
Fixed.

Original comment by josh.petrie on 21 Feb 2009 at 5:28