From d70dc160c4feefc6f029f2760f140ebbbb455981 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sun, 10 Apr 2011 00:37:20 +0000
Subject: [PATCH] Fix crash on big maps

git-svn-id: http://svn.net-core.org/repos/t-engine4@3201 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/data/quests/ring-of-blood.lua | 2 +-
 src/map.c                                       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/game/modules/tome/data/quests/ring-of-blood.lua b/game/modules/tome/data/quests/ring-of-blood.lua
index 8a6b1e13d8..55b4ec2154 100644
--- a/game/modules/tome/data/quests/ring-of-blood.lua
+++ b/game/modules/tome/data/quests/ring-of-blood.lua
@@ -72,7 +72,7 @@ start_game = function(self)
 
 	slave.on_die = function(self)
 		game.player:hasQuest("ring-of-blood"):stop_game(false)
-		game.log("#CRIMSON#The crowd yells: 'LOOSER!'")
+		game.log("#CRIMSON#The crowd yells: 'LOSER!'")
 	end
 
 	game.log("#LIGHT_GREEN#As you touch the orb your will fills the slave's body. You take full control of his actions!")
diff --git a/src/map.c b/src/map.c
index 8540304ca6..7704a7bb82 100644
--- a/src/map.c
+++ b/src/map.c
@@ -1329,7 +1329,7 @@ static int minimap_to_screen(lua_State *L)
 				if ((i < 0) || (j < 0) || (i >= map->w) || (j >= map->h)) continue;
 				map_object *mo = map->grids[i][j][z];
 				if (!mo || mo->mm_r < 0) continue;
-				ptr = (j * map->mm_rw + i) * 4;
+				ptr = ((j-mdy) * map->mm_rw + (i-mdx)) * 4;
 
 				if ((mo->on_seen && map->grids_seens[j*map->w+i]) || (mo->on_remember && map->grids_remembers[i][j]) || mo->on_unknown)
 				{
-- 
GitLab