[Scummvm-cvs-logs] CVS: scummvm/backends/midi/mt32 partial.cpp,1.11,1.12
Max Horn
fingolfin at users.sourceforge.net
Sun Nov 28 05:13:47 CET 2004
Update of /cvsroot/scummvm/scummvm/backends/midi/mt32
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24544/backends/midi/mt32
Modified Files:
partial.cpp
Log Message:
fixed an unsigned comparision warning (does this code really do what you intended it to do?)
Index: partial.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32/partial.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- partial.cpp 28 Nov 2004 05:35:07 -0000 1.11
+++ partial.cpp 28 Nov 2004 13:09:02 -0000 1.12
@@ -726,8 +726,8 @@
if (tStat->decaying) {
tc = tStat->envbase;
tc = (tc + ((tStat->envdist * tStat->envpos) / tStat->envsize));
- if (tc < 0)
- tc = 0;
+ //if (tc < 0) // tc is unsigned, so it will *never* be less than 0
+ // tc = 0;
if ((tStat->envpos >= tStat->envsize) || (tc == 0)) {
play = false;
// Don't have to worry about prevlevel storage or anything, this partial's about to die
More information about the Scummvm-git-logs
mailing list