diff minijss/jssmod.c @ 1402:b47109fce375

Make JSSExtInstrument.instConvSamples dynamically allocated and add check for XM_MaxInstSamples in XM loader.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 30 Oct 2017 18:12:38 +0200
parents aaed8fa9a11f
children 6aa0897265e8
line wrap: on
line diff
--- a/minijss/jssmod.c	Mon Oct 30 18:01:25 2017 +0200
+++ b/minijss/jssmod.c	Mon Oct 30 18:12:38 2017 +0200
@@ -430,10 +430,7 @@
 
     // Initialize the requisite fields
     for (i = 0; i < jsetNNotes; i++)
-    {
         inst->sNumForNotes[i] = jsetNotSet;
-        inst->instConvTable[i] = jsetNotSet;
-    }
 
     return inst;
 }
@@ -446,6 +443,7 @@
 #ifndef JSS_LIGHT
         dmFree(inst->desc);
 #endif
+        dmFree(inst->instConvTable);
         dmFree(inst);
     }
 }