aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-12-31 15:23:08 +0000
committerTorbjörn Andersson2008-12-31 15:23:08 +0000
commit890808fa4bc417d511493c14aae1cfffa75136b6 (patch)
tree36006fc61d35bbfc96d72878af1b7f09108935de
parent569636eb54fcc636773e0a28382f8f4d1c8d3a3f (diff)
downloadscummvm-rg350-890808fa4bc417d511493c14aae1cfffa75136b6.tar.gz
scummvm-rg350-890808fa4bc417d511493c14aae1cfffa75136b6.tar.bz2
scummvm-rg350-890808fa4bc417d511493c14aae1cfffa75136b6.zip
Rewrote to get rid of "condition is always false" warning.
svn-id: r35639
-rw-r--r--sound/shorten.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/shorten.cpp b/sound/shorten.cpp
index 369ffcf9d2..b550a5afec 100644
--- a/sound/shorten.cpp
+++ b/sound/shorten.cpp
@@ -379,7 +379,7 @@ byte *loadShortenFromStream(Common::ReadStream &stream, int &size, int &rate, by
// FIXME: The original code did an invalid memory access here
// (if i and j are 0, the array index requested is -1)
// I've removed those invalid writes, since they happen all the time (even when curChannel is 0)
- if (i - j - 1 < 0) // ignore invalid table/memory access
+ if (i <= j) // ignore invalid table/memory access
continue;
sum += lpc[j] * buffer[curChannel][i - j - 1];
}