From e2db155b1a82150a4c651a643b6a4343e810b8e9 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Sun, 11 Oct 2009 22:34:01 +0000 Subject: sword1: fix one gcc warning about comparison between signed and unsigned svn-id: r44955 --- engines/sword1/music.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); -- cgit v1.2.3