From 3256a7d9742422e248ce7e763a5adeb855552499 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 13 Oct 2008 03:02:24 +0000 Subject: Fix off-by-1 memory error. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1670 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/ConnectionImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/ConnectionImpl.cpp b/src/engine/ConnectionImpl.cpp index 53cef102..eea81510 100644 --- a/src/engine/ConnectionImpl.cpp +++ b/src/engine/ConnectionImpl.cpp @@ -175,7 +175,7 @@ ConnectionImpl::process(ProcessContext& context) assert(src_port()->poly() == dst_port()->poly()); const size_t copy_size = std::min(src_port()->buffer_size(), dst_port()->buffer_size()); for (uint32_t i=0; i < src_port()->poly(); ++i) { - dst_port()->buffer(i)->copy(src_port()->buffer(i), 0, copy_size); + dst_port()->buffer(i)->copy(src_port()->buffer(i), 0, copy_size-1); } } else if (_mode == MIX) { assert(type() == DataType::AUDIO || type() == DataType::CONTROL); -- cgit v1.2.1