aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamieson Christian2003-05-25 21:32:11 +0000
committerJamieson Christian2003-05-25 21:32:11 +0000
commit0eb2d798d476d2832a605f04de729e7835019bde (patch)
treea4a05ef1119560e83ad419816a3873c102439db5
parent80eab4c3c48a4291b68918838d543ed98b13ea9c (diff)
downloadscummvm-rg350-0eb2d798d476d2832a605f04de729e7835019bde.tar.gz
scummvm-rg350-0eb2d798d476d2832a605f04de729e7835019bde.tar.bz2
scummvm-rg350-0eb2d798d476d2832a605f04de729e7835019bde.zip
Fixed undefined file read operation
svn-id: r7971
-rw-r--r--simon/midi.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/simon/midi.cpp b/simon/midi.cpp
index 42f86f627d..11940a1229 100644
--- a/simon/midi.cpp
+++ b/simon/midi.cpp
@@ -461,9 +461,9 @@ void MidiPlayer::loadS1D (File *in, bool sfx) {
MusicInfo *p = sfx ? &_sfx : &_music;
clearConstructs (*p);
- uint32 size = in->readByte() | (in->readByte() << 8);
+ uint16 size = in->readUint16LE();
if (size != in->size() - 2) {
- printf ("ERROR! Size mismatch in simon1demo MUS file (%ld versus reported %ld)\n", (long) in->size() - 2, (long) size);
+ printf ("ERROR! Size mismatch in simon1demo MUS file (%ld versus reported %d)\n", (long) in->size() - 2, (int) size);
_system->unlock_mutex (_mutex);
return;
}