changeset 2471:e0f9200b94ad

Use jsetMaxPatterns for "empty" pattern instead of npatterns.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 27 Apr 2020 03:13:14 +0300
parents abc0b42cfbc5
children fd02e78f6fdc
files minijss/jloadxm.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/minijss/jloadxm.c	Mon Apr 27 03:10:15 2020 +0300
+++ b/minijss/jloadxm.c	Mon Apr 27 03:13:14 2020 +0300
@@ -410,7 +410,7 @@
     }
 
     // Allocate the empty pattern
-    module->patterns[module->npatterns] = jssAllocatePattern(64, module->nchannels);
+    module->patterns[jsetMaxPatterns] = jssAllocatePattern(64, module->nchannels);
 
     /* Convert song orders list by replacing nonexisting
      * pattern numbers with pattern number jsetMaxPatterns.
@@ -420,7 +420,7 @@
         int tmp = xmH->orderList[index];
         if (tmp >= module->npatterns ||
             module->patterns[tmp] == NULL)
-            tmp = module->npatterns;
+            tmp = jsetMaxPatterns;
 
         module->orderList[index] = tmp;
     }