mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Fixed endianness issue with precaching of MUS files
This commit is contained in:
parent
e9ce699042
commit
099bfed806
1 changed files with 2 additions and 2 deletions
|
@ -211,11 +211,11 @@ bool MUSSong2::CheckDone()
|
||||||
|
|
||||||
void MUSSong2::Precache()
|
void MUSSong2::Precache()
|
||||||
{
|
{
|
||||||
TArray<WORD> work(MusHeader->NumInstruments);
|
TArray<WORD> work(LittleShort(MusHeader->NumInstruments));
|
||||||
const BYTE *used = (BYTE *)MusHeader + sizeof(MUSHeader) / sizeof(BYTE);
|
const BYTE *used = (BYTE *)MusHeader + sizeof(MUSHeader) / sizeof(BYTE);
|
||||||
int i, k;
|
int i, k;
|
||||||
|
|
||||||
for (i = k = 0; i < MusHeader->NumInstruments; ++i)
|
for (i = k = 0; i < LittleShort(MusHeader->NumInstruments); ++i)
|
||||||
{
|
{
|
||||||
BYTE instr = used[k++];
|
BYTE instr = used[k++];
|
||||||
WORD val;
|
WORD val;
|
||||||
|
|
Loading…
Reference in a new issue