Fix use of uninitialized variables (fixes straight lines in maze gen aswell)
authorunc0rr
Sun, 09 Nov 2014 23:44:13 +0300
changeset 10478 12662c21e0e9
parent 10477 b219c5a2317f
child 10479 31afb7cdff69
Fix use of uninitialized variables (fixes straight lines in maze gen aswell)
gameServer/OfficialServer/checker.hs
hedgewars/uLandGenTemplateBased.pas
--- a/gameServer/OfficialServer/checker.hs	Sun Nov 09 14:58:43 2014 -0500
+++ b/gameServer/OfficialServer/checker.hs	Sun Nov 09 23:44:13 2014 +0300
@@ -30,7 +30,7 @@
 import Control.Concurrent
 import Network
 import Network.BSD
-import Network.Socket hiding (recv)
+import Network.Socket hiding (recv, sClose)
 import Network.Socket.ByteString
 import qualified Data.ByteString.Char8 as B
 import qualified Data.ByteString as BW
--- a/hedgewars/uLandGenTemplateBased.pas	Sun Nov 09 14:58:43 2014 -0500
+++ b/hedgewars/uLandGenTemplateBased.pas	Sun Nov 09 23:44:13 2014 +0300
@@ -152,6 +152,10 @@
         iy:= (rightX - mapBorderMargin - mp.x) * b div a + mp.y;
         d:= DistanceI(mp.x - rightX + mapBorderMargin, mp.y - iy).Round;
         if t1 > 0 then distR:= d else distL:= d;
+    end else
+    begin
+        distL:= LAND_WIDTH + LAND_HEIGHT;
+        distR:= distL;
     end;
 
     if b <> 0 then