From 65ef67e0f14856d52e6321ae7d908d4407fb6b01 Mon Sep 17 00:00:00 2001 From: Stepan Moskovchenko Date: Wed, 10 Jan 2007 17:53:54 +0000 Subject: Fix a nasty little bug that would under the right conditions cause memory corruption and other weirdness. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11978 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/midi/sequencer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/plugins/midi/sequencer.c') diff --git a/apps/plugins/midi/sequencer.c b/apps/plugins/midi/sequencer.c index fdfd5d7620..d56bd26f5c 100644 --- a/apps/plugins/midi/sequencer.c +++ b/apps/plugins/midi/sequencer.c @@ -188,7 +188,7 @@ void pressNote(int ch, int note, int vol) if(voices[a].isUsed==0) break; } - if(a==MAX_VOICES-1) + if(a==MAX_VOICES) { // printf("\nVoice kill"); // printf("\nToo many voices playing at once. No more left"); -- cgit v1.2.3