From 13eb510baf70be80afbad8473c6992b5a5119e99 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 15 Jul 2010 10:00:32 +0000 Subject: Bugfix to the SqrtF16 function to work correctly svn-id: r50912 --- engines/m4/rails.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/m4/rails.cpp') 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) { -- cgit v1.2.3