Skip to content

Commit

Permalink
[XM]: On big-endian, the endian reverse code for sample envelopes had…
Browse files Browse the repository at this point in the history
… the two loop counters in reverse order causing the code reverse endian on some "random" values upward on the stack.

Fixes #120
  • Loading branch information
mywave82 committed Dec 4, 2024
1 parent 862d214 commit 1eb1ee1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playxm/xmload.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ OCP_INTERNAL int xmpLoadModule (struct cpifaceSessionAPI_t *cpifaceSession, stru
cpifaceSession->cpiDebug (cpifaceSession, "[XM/XM] warning, Panning loop end point (%d) >= Number of panning points (%d), truncating\n", ins2.ploope, ins2.pnum);
ins2.ploope=ins2.pnum-1;
}
for (k=0;k<12;k++)
for (j=0;j<2;j++)
for (k=0;k<2;k++)
for (j=0;j<12;j++)
{
ins2.venv[j][k] = uint16_little (ins2.venv[j][k]);
ins2.penv[j][k] = uint16_little (ins2.penv[j][k]);
Expand Down

0 comments on commit 1eb1ee1

Please sign in to comment.