diff options
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r-- | src/drumgizmo.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index 1abbb10..0337fae 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -333,6 +333,7 @@ void DrumGizmo::getSamples(int ch, int pos, sample_t *s, size_t sz) if(evt->offset > (size_t)pos) n = evt->offset - pos; size_t end = sz; if(evt->t + end - n > af->size) end = af->size - evt->t + n; + if(end > sz) end = sz; if(evt->rampdown == NO_RAMPDOWN) { #ifdef SSE |