changeset 811:9e324a69e460

Fix label coordinate adjustment at map bounds.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 07 Aug 2009 18:02:55 +0000
parents 75b24cdb30ad
children 020e1d79aa0d
files mkloc.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mkloc.c	Fri Aug 07 18:02:23 2009 +0000
+++ b/mkloc.c	Fri Aug 07 18:02:55 2009 +0000
@@ -937,12 +937,12 @@
             
         x1 = x0 + len + 1;
             
-        if (x1 >= map->w)
-            x0 -= (x1 - map->w + 1);
+        if (x1 > map->w)
+            x0 -= (x1 - map->w - 1);
         if (x0 < 0) x0 = 0;
         
         if (y < 0) y += 2;
-        if (y >= map->h) y -= (y - map->h);
+        if (y > map->h) y -= (y - map->h - 1);
         
         /* Update location info */
         tmp->x = x0;