blob: f70c35e0bfe8fdbd2dcc135a83f78c6971c00313 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
--- loaders/load_xm.c
+++ loaders/load_xm.c
@@ -611,7 +611,8 @@ static BOOL LoadInstruments(void)
nextwav[of.numsmp+u]=next;
next+=s->length;
- if(_mm_eof(modreader)) {
+ /* last instrument is at the end of file in version 0x0104 */
+ if(_mm_eof(modreader) && (mh->version<0x0104 || t<of.numins-1)) {
MikMod_free(nextwav);MikMod_free(wh);
nextwav=NULL;wh=NULL;
_mm_errno = MMERR_LOADING_SAMPLEINFO;
|