hedgewars/uLandGenPerlin.pas
changeset 10494 0eb97cf4c78e
parent 10492 0cf3b2762606
child 10510 9329dab04490
--- a/hedgewars/uLandGenPerlin.pas	Wed Nov 12 22:47:43 2014 +0900
+++ b/hedgewars/uLandGenPerlin.pas	Fri Nov 14 17:00:47 2014 +0300
@@ -55,7 +55,7 @@
 
 function lerp(t, a, b: LongInt) : LongInt; inline;
 begin
-    lerp:= a + (Int64(b - a) * t shr 12)
+    lerp:= a + ((Int64(b) - a) * t shr 12)
 end;
 
 
@@ -103,7 +103,7 @@
 end;
 
 procedure inoise_setup();
-var i, ii, t: LongInt;
+var i, ii, t: Longword;
 begin
     for i:= 0 to 254 do
         p[i]:= i + 1;