aboutsummaryrefslogtreecommitdiff
path: root/engines/m4
diff options
context:
space:
mode:
authorPaul Gilbert2010-07-15 10:00:32 +0000
committerPaul Gilbert2010-07-15 10:00:32 +0000
commit13eb510baf70be80afbad8473c6992b5a5119e99 (patch)
tree6b20a715f07e1181577219806613162b52deef80 /engines/m4
parent72faf78b82a6395a058d89f1e349c6831e9517a7 (diff)
downloadscummvm-rg350-13eb510baf70be80afbad8473c6992b5a5119e99.tar.gz
scummvm-rg350-13eb510baf70be80afbad8473c6992b5a5119e99.tar.bz2
scummvm-rg350-13eb510baf70be80afbad8473c6992b5a5119e99.zip
Bugfix to the SqrtF16 function to work correctly
svn-id: r50912
Diffstat (limited to 'engines/m4')
-rw-r--r--engines/m4/rails.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/m4/rails.cpp b/engines/m4/rails.cpp
index fbad6995eb..11b9bcdbb9 100644
--- a/engines/m4/rails.cpp
+++ b/engines/m4/rails.cpp
@@ -179,7 +179,7 @@ long SqrtF16(long n) {
uint32 r = 0, s;
uint32 v = (uint32)n;
- for (int i = 15; i <= 0; i--) {
+ for (int i = 15; i >= 0; --i) {
s = r + (1L << i * 2);
r >>= 1;
if (s <= v) {