From 3a38a92326c983ba33807d956a4bbfb4b05da971 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 9 Oct 2011 22:56:37 +0000 Subject: Fix RingBuffer error when reading split/wrapped messages. More rigorous, multithreaded RingBuffer test. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@3540 a436a847-0d15-0410-975c-d299462d15a1 --- raul/RingBuffer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'raul/RingBuffer.hpp') diff --git a/raul/RingBuffer.hpp b/raul/RingBuffer.hpp index 8642514..faf1142 100644 --- a/raul/RingBuffer.hpp +++ b/raul/RingBuffer.hpp @@ -199,7 +199,7 @@ private: } else { const uint32_t first_size = _size - r; memcpy(dst, &_buf[r], first_size); - memcpy(dst, &_buf[0], size - first_size); + memcpy((char*)dst + first_size, &_buf[0], size - first_size); } return size; -- cgit v1.2.1