ref: 87e50171faa5c54a2a5871724dec7de97145a877
parent: 300747998d931911ba24b7b1ab894f2acbfbaf55
author: Timothy B. Terriberry <[email protected]>
date: Tue Oct 2 03:58:06 EDT 2012
Fix a 10L bug in the memory stream reader. It's helpful if we don't always read from the start of the array. Thanks to Matti Virolainen for the report.
--- a/src/stream.c
+++ b/src/stream.c
@@ -105,7 +105,7 @@
_nmemb=(size-pos)/_size;
total=_size*_nmemb;
}
- memcpy(_ptr,stream->data,total);
+ memcpy(_ptr,stream->data+pos,total);
pos+=total;
stream->pos=pos;
return _nmemb;