]> granicus.if.org Git - nethack/commitdiff
Fix the mtrack memset
authorPasi Kallinen <paxed@alt.org>
Wed, 6 Jan 2016 16:15:04 +0000 (18:15 +0200)
committerPasi Kallinen <paxed@alt.org>
Wed, 6 Jan 2016 16:15:04 +0000 (18:15 +0200)
src/dog.c
src/monmove.c
src/teleport.c

index 361c7de023fbb0c43f7989b7f0034a873d7bae39..a5f8a5a759eeb08cd0269fd6b3f5f048d5120aeb 100644 (file)
--- a/src/dog.c
+++ b/src/dog.c
@@ -325,7 +325,7 @@ boolean with_you;
     xyflags = mtmp->mtrack[0].y;
     xlocale = mtmp->mtrack[1].x;
     ylocale = mtmp->mtrack[1].y;
-    memset(mtmp->mtrack, MTSZ, sizeof(coord));
+    memset(mtmp->mtrack, 0, sizeof(mtmp->mtrack));
 
     if (mtmp == u.usteed)
         return; /* don't place steed on the map */
index cae22b8b5d8a3a2b5b61d44dc6d300287ea19851..86432a6c5e6c417bb262476bfae48ecc458c4b82 100644 (file)
@@ -272,7 +272,7 @@ boolean fleemsg;
         mtmp->mflee = 1;
     }
     /* ignore recently-stepped spaces when made to flee */
-    memset(mtmp->mtrack, MTSZ, sizeof(coord));
+    memset(mtmp->mtrack, 0, sizeof(mtmp->mtrack));
 }
 
 STATIC_OVL void
index 47780e7da4136d98d1a8d957e880cfc8ee380975..43e97da63424c40488a06683beccb8a70b410f42 100644 (file)
@@ -980,7 +980,7 @@ register int x, y;
         }
     }
 
-    memset(mtmp->mtrack, MTSZ, sizeof(coord));
+    memset(mtmp->mtrack, 0, sizeof(mtmp->mtrack));
     place_monster(mtmp, x, y); /* put monster down */
     update_monster_region(mtmp);