summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-05 17:37:17 -0500
committerDavid Robillard <d@drobilla.net>2015-02-09 13:45:37 -0500
commit429da16b608fe9e87971797290c24f67cc112b2b (patch)
treea4e80ce39f235b249bc4d831c39085bf3ff816ed
parentabcd70c1d2a48c2af9ec49dfc46b264cc07370e2 (diff)
Fix sending out of bounds events to LV2 plugins.
-rw-r--r--libs/ardour/lv2_plugin.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 5a97bfa41f..7f744be3d6 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -2012,7 +2012,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
LV2_Evbuf* buf = _ev_buffers[msg.index];
LV2_Evbuf_Iterator i = lv2_evbuf_end(buf);
const LV2_Atom* const atom = (const LV2_Atom*)&body[0];
- if (!lv2_evbuf_write(&i, nframes, 0, atom->type, atom->size,
+ if (!lv2_evbuf_write(&i, nframes - 1, 0, atom->type, atom->size,
(const uint8_t*)(atom + 1))) {
error << "Failed to write data to LV2 event buffer\n";
}