shithub: dumb

Download patch

ref: da229930ce0f698c7443ae693e593d582748822f
parent: df55c420128a38d58016ef9517707c37b15e67fc
author: Chris Moeller <kode54@gmail.com>
date: Mon Jan 11 04:01:37 EST 2010

{4/18/2009 4:30:02 PM}- Fixed another bug in xm_note_off with potential unknown files.
- Version is now 0.9.8.5

git-tfs-id: [http://localhost:8080/tfs/DefaultCollection/]$/foobar2000/files/plugins.root;C259

--- a/dumb/src/it/itrender.c
+++ b/dumb/src/it/itrender.c
@@ -1399,7 +1399,7 @@
 static void xm_note_off(DUMB_IT_SIGDATA *sigdata, IT_CHANNEL *channel)
 {
 	if (channel->playing) {
-		if (channel->instrument > sigdata->n_instruments ||
+		if (!channel->instrument || channel->instrument > sigdata->n_instruments ||
 			!(sigdata->instrument[channel->instrument-1].volume_envelope.flags & IT_ENVELOPE_ON))
 			//if (!(entry->mask & IT_ENTRY_INSTRUMENT))
 			// dunno what that was there for ...