Mercurial > hg > dmlib
diff minijss/jloadxm.c @ 1225:e8f0305f8e6b
Use module->npatterns instead of jsetMaxPatterns for the special empty pattern.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 06 Mar 2015 10:00:54 +0200 |
parents | 96ad216e9b59 |
children | 18baa42db260 |
line wrap: on
line diff
--- a/minijss/jloadxm.c Fri Mar 06 09:56:21 2015 +0200 +++ b/minijss/jloadxm.c Fri Mar 06 10:00:54 2015 +0200 @@ -404,7 +404,7 @@ } // Allocate the empty pattern - module->patterns[jsetMaxPatterns] = jssAllocatePattern(64, module->nchannels); + module->patterns[module->npatterns] = jssAllocatePattern(64, module->nchannels); /* Convert song orders list by replacing nonexisting * pattern numbers with pattern number jsetMaxPatterns. @@ -414,7 +414,7 @@ int tmp = xmH->orderList[index]; if (tmp >= module->npatterns || module->patterns[tmp] == NULL) - tmp = jsetMaxPatterns; + tmp = module->npatterns; module->orderList[index] = tmp; }