From fe181abb53dad216781c36967033f8c55cbf1c71 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 16 Dec 2015 02:49:40 +0100
Subject: [PATCH] Client: Fix win_map() confusion when map smaller than window.

---
 roguelike-client | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/roguelike-client b/roguelike-client
index 040a2d2..bc8b2f5 100755
--- a/roguelike-client
+++ b/roguelike-client
@@ -338,7 +338,8 @@ def win_map():
     win_size = next(win["size"] for win in windows if win["func"] == win_map)
     offset = [0, 0]
     for i in range(2):
-        if world_data["map_center"][i] * (i + 1) > win_size[i] / 2:
+        if world_data["map_center"][i] * (i + 1) > win_size[i] / 2 and \
+                win_size[i] < world_data["map_size"] * (i + 1):
             if world_data["map_center"][i] * (i + 1) \
                 < world_data["map_size"] * (i + 1) - win_size[i] / 2:
                 offset[i] = world_data["map_center"][i] * (i + 1) \
-- 
2.30.2