Mercurial > hg > forks > bilotrip-mj12
changeset 49:1efee62c0f96
Possibly fix MIDI loading(?)
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 06 Aug 2013 15:39:53 +0300 |
parents | d77dd667d9d6 |
children | e2ac88d85aec |
files | src/midifile.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/midifile.c Tue Aug 06 00:54:31 2013 +0300 +++ b/src/midifile.c Tue Aug 06 15:39:53 2013 +0300 @@ -111,7 +111,7 @@ { if (pMF->curr + n < pMF->end) { - int res = strncmp((char *) pMF->curr, str, n); + int res = memcmp(pMF->curr, str, n); pMF->curr += n; return res; } @@ -500,6 +500,8 @@ goto error; } + pMF->end = pMF->ptr + pMF->file_size; + fseek(fp, 0L, SEEK_SET); if (fread(pMF->ptr, sizeof(Uint8), pMF->file_size, fp) != pMF->file_size) {