Check if frontend was too lazy to actually send drawn map data to the server
authorunc0rr
Wed, 22 Jan 2014 14:45:33 +0400
changeset 10050 9616052bd333
parent 10049 ca11d122f54e
child 10051 cc6f62d7aea2
Check if frontend was too lazy to actually send drawn map data to the server
gameServer/EngineInteraction.hs
--- a/gameServer/EngineInteraction.hs	Wed Jan 22 09:19:08 2014 +0400
+++ b/gameServer/EngineInteraction.hs	Wed Jan 22 14:45:33 2014 +0400
@@ -86,7 +86,7 @@
         mapgen = mParams Map.! "MAPGEN"
         mapgenSpecific = case mapgen of
             "1" -> [eml ["e$maze_size ", head $ prms Map.! "MAZE_SIZE"]]
-            "2" -> drawnMapData . head $ prms Map.! "DRAWNMAP"
+            "2" -> let d = head $ prms Map.! "DRAWNMAP" in if null $ tail d then [] else drawnMapData d
             _ -> []
         gameFlags :: Word32
         gameFlags = foldl (\r (b, f) -> if b == "false" then r else r .|. f) 0 $ zip scheme gameFlagConsts