From 01cc5234dc5abc6613c0468069e30803f206d9d3 Mon Sep 17 00:00:00 2001 From: Yexo Date: Wed, 21 Jan 2009 23:49:59 +0000 Subject: (svn r15201) -Fix [FS#2565] (r15190): The smallmap tried to get the owner of invalid tiles. --- src/smallmap_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 01afe7fe4..6e76a43ee 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -292,7 +292,8 @@ static void DrawSmallMapStuff(void *dst, uint xc, uint yc, int pitch, int reps, do { /* check if the tile (xc,yc) is within the map range */ - if (xc < MapMaxX() && yc < MapMaxY()) { + uint min_xy = _settings_game.construction.freeform_edges ? 1 : 0; + if (IsInsideMM(xc, min_xy, MapMaxX()) && IsInsideMM(yc, min_xy, MapMaxY())) { /* check if the dst pointer points to a pixel inside the screen buffer */ if (dst < _screen.dst_ptr) continue; if (dst >= dst_ptr_abs_end) continue; -- cgit v1.2.3-70-g09d2