Mercurial > hg > dmlib
changeset 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 | e667710aee8e |
children | 18baa42db260 |
files | minijss/jloadxm.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
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; }