aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1/music.cpp
diff options
context:
space:
mode:
authorFabio Battaglia2009-10-11 22:34:01 +0000
committerFabio Battaglia2009-10-11 22:34:01 +0000
commite2db155b1a82150a4c651a643b6a4343e810b8e9 (patch)
tree9ffca4fae4e8c08e5731a47b74b6b8255f9bb406 /engines/sword1/music.cpp
parentc4563616ae06194087b467746fe2b820b6311ac0 (diff)
downloadscummvm-rg350-e2db155b1a82150a4c651a643b6a4343e810b8e9.tar.gz
scummvm-rg350-e2db155b1a82150a4c651a643b6a4343e810b8e9.tar.bz2
scummvm-rg350-e2db155b1a82150a4c651a643b6a4343e810b8e9.zip
sword1: fix one gcc warning about comparison between signed and unsigned
svn-id: r44955
Diffstat (limited to 'engines/sword1/music.cpp')
-rw-r--r--engines/sword1/music.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sword1/music.cpp b/engines/sword1/music.cpp
index 77c44a3aa6..e30ba96bb7 100644
--- a/engines/sword1/music.cpp
+++ b/engines/sword1/music.cpp
@@ -285,7 +285,9 @@ bool MusicHandle::playPSX(uint16 id, bool loop) {
tableFile.close();
- if ((size != 0) && (size != 0xffffffff) && ((offset + size) <= _file.size())) {
+ // Because of broken tunes.dat/tab in psx demo, also check that tune offset is
+ // not over file size
+ if ((size != 0) && (size != 0xffffffff) && ((int32)(offset + size) <= _file.size())) {
_file.seek(offset, SEEK_SET);
_audioSource = new Audio::VagStream(_file.readStream(size), loop);
fadeUp();