aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--simon/midi.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/simon/midi.cpp b/simon/midi.cpp
index 19d573a935..2a3c45eb41 100644
--- a/simon/midi.cpp
+++ b/simon/midi.cpp
@@ -79,11 +79,10 @@ void MidiPlayer::read_mthd(File *in, Song *s, bool old)
for (i = 0; i != s->num_tracks; i++, t++) {
if (!old) {
- uint32 foo = in->readUint32BE();
- if (foo != 'MTrk')
- error("Midi track has no 'MTrk' (%d, %08x)", i, foo);
+ if (in->readUint32BE() != 'MTrk')
+ error("Midi track has no 'MTrk'", i, foo);
- t->data_size = in->readUint32LE();
+ t->data_size = in->readUint32BE();
} else {
uint32 pos = in->pos();
in->seek(0, SEEK_END);