From c7af1c332447e5fb25f37d4738458a5d7106a6fc Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 4 Oct 2014 17:45:54 +0200 Subject: Fix crash bug. --- src/drumgizmo.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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 -- cgit v1.2.3