Skip to content

Commit

Permalink
Fix StSound getting stuck loading some songs
Browse files Browse the repository at this point in the history
The loading of YM files has changed in the recent version of StSound and
it seems to cause issue when loading some songs, going into an infinite
loop. Restore the previous Ymload code for now from the older version of
StSound.
  • Loading branch information
nguillaumin committed Sep 21, 2024
1 parent 6f44aa3 commit fe4c00d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stsound/StSound/StSoundLibrary/Ymload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ unsigned char *CYmMusic::depackFile(ymu32 checkOriginalSize)
return NULL;
}

pSrc = pBigMalloc + pHeader->size;
// pSrc = pBigMalloc + pHeader->size;
pSrc = pBigMalloc+sizeof(lzhHeader_t)+pHeader->name_lenght;
ymu32 packedSize = ReadLittleEndian32((ymu8*)&pHeader->packed);

pSrc += 2; // skip CRC16
Expand Down

0 comments on commit fe4c00d

Please sign in to comment.