[Scummvm-cvs-logs] SF.net SVN: scummvm:[35639] scummvm/trunk/sound/shorten.cpp

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Wed Dec 31 16:23:09 CET 2008


Revision: 35639
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35639&view=rev
Author:   eriktorbjorn
Date:     2008-12-31 15:23:08 +0000 (Wed, 31 Dec 2008)

Log Message:
-----------
Rewrote to get rid of "condition is always false" warning.

Modified Paths:
--------------
    scummvm/trunk/sound/shorten.cpp

Modified: scummvm/trunk/sound/shorten.cpp
===================================================================
--- scummvm/trunk/sound/shorten.cpp	2008-12-31 15:11:39 UTC (rev 35638)
+++ scummvm/trunk/sound/shorten.cpp	2008-12-31 15:23:08 UTC (rev 35639)
@@ -379,7 +379,7 @@
 								// 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];
 							}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list