Permalink
Browse files

Let htsbuf_peek() return bytes peeked so it is consitent with htsbuf_…

…read().
  • Loading branch information...
1 parent 3c1f4fe commit 91864b9ac30f977741daa36bfb47c23d91bd3569 @hean01 hean01 committed Oct 2, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/htsmsg/htsbuf.c
View
@@ -186,6 +186,7 @@ htsbuf_peek(htsbuf_queue_t *hq, void *buf, size_t len)
c = MIN(hd->hd_data_len - hd->hd_data_off, len);
memcpy(buf, hd->hd_data + hd->hd_data_off, c);
+ r += c;
buf += c;
len -= c;

0 comments on commit 91864b9

Please sign in to comment.