diff xm2jss.c @ 202:85614db5f577

Warn about invalid instruments.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 07 Oct 2012 08:53:51 +0300
parents 50f55def91e5
children 245b15cd1919
line wrap: on
line diff
--- a/xm2jss.c	Sun Oct 07 07:54:22 2012 +0300
+++ b/xm2jss.c	Sun Oct 07 08:53:51 2012 +0300
@@ -875,6 +875,9 @@
 
             if (n->instrument >= 0 && n->instrument <= jsetMaxInstruments)
                 n->instrument = mapExtInstruments[n->instrument];
+
+            if (n->instrument != jsetNotSet && r->extInstruments[n->instrument] == NULL)
+                dmError("Non-existing instrument used #%d.\n", n->instrument);
             
             JMPGETEFFECT(effect, n->effect);