diff options
author | David Robillard <d@drobilla.net> | 2011-10-09 23:00:47 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-10-09 23:00:47 +0000 |
commit | dc02039e446f90323b295cd78b7993617beafd7e (patch) | |
tree | f50365a55da6bb75a1875149c089d1ff016d3885 /src | |
parent | b3af6f000f23cdc0e3fafdfa407d4cf592c946f4 (diff) | |
download | zix-dc02039e446f90323b295cd78b7993617beafd7e.tar.gz zix-dc02039e446f90323b295cd78b7993617beafd7e.tar.bz2 zix-dc02039e446f90323b295cd78b7993617beafd7e.zip |
Fix ZixRing error when reading split/wrapped messages.
Use a non-power-of-two message size in ZixRing test to test this.
git-svn-id: http://svn.drobilla.net/zix/trunk@43 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'src')
-rw-r--r-- | src/ring.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -153,7 +153,7 @@ peek_internal(const ZixRing* ring, uint32_t r, uint32_t w, } else { const uint32_t first_size = ring->size - r; memcpy(dst, &ring->buf[r], first_size); - memcpy(dst, &ring->buf[0], size - first_size); + memcpy((char*)dst + first_size, &ring->buf[0], size - first_size); } return size; |