]> granicus.if.org Git - nethack/commitdiff
Map column 0 is not a valid location
authorPasi Kallinen <paxed@alt.org>
Wed, 21 Nov 2018 17:17:08 +0000 (19:17 +0200)
committerPasi Kallinen <paxed@alt.org>
Wed, 21 Nov 2018 17:17:08 +0000 (19:17 +0200)
src/dog.c
src/mail.c
src/mon.c

index 144427e0d5ac03944f15121dce21685c2ef6c421..0d967195eacf31739e6a694342b18077f46c0dfc 100644 (file)
--- a/src/dog.c
+++ b/src/dog.c
@@ -484,7 +484,7 @@ fail_mon_placement:
                 && !LEVEL_SPECIFIC_NOCORPSE(mtmp->data))
                 (void) mkcorpstat(CORPSE, mtmp, mtmp->data,
                                   xlocale, ylocale, CORPSTAT_NONE);
-            mtmp->mx = mtmp->my = -1; /* for mongone, mon is not anywhere */
+            mtmp->mx = mtmp->my = 0; /* for mongone, mon is not anywhere */
             mongone(mtmp);
         }
     }
index 376fb4a2a2ffd0dd47e75cf7de6d32098d5e8245..b3f8e97c6a92201104106a88b8513f69a89ff030 100644 (file)
@@ -423,7 +423,7 @@ struct mail_info *info;
 /* zip back to starting location */
 go_back:
     if (!md_rush(md, start.x, start.y))
-        md->mx = md->my = -1; /* for mongone, md is not on map */
+        md->mx = md->my = 0; /* for mongone, md is not on map */
     mongone(md);
 /* deliver some classes of messages even if no daemon ever shows up */
 give_up:
index 64f906e6bd34130b72c890e339b174565f77491b..043b22e892217bf47316cec1da301e3e821a6a1a 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -105,7 +105,7 @@ mon_sanity_check()
         }
     }
 
-    for (x = 0; x < COLNO; x++)
+    for (x = 1; x < COLNO; x++)
         for (y = 0; y < ROWNO; y++)
             if ((mtmp = level.monsters[x][y]) != 0) {
                 for (m = fmon; m; m = m->nmon)
@@ -1747,7 +1747,7 @@ m_detach(mtmp, mptr)
 struct monst *mtmp;
 struct permonst *mptr; /* reflects mtmp->data _prior_ to mtmp's death */
 {
-    boolean onmap = (mtmp->mx > -1);
+    boolean onmap = (mtmp->mx > 0);
 
     if (mtmp == context.polearm.hitmon)
         context.polearm.hitmon = 0;