From: Ari Johnson <ari@cobramush.org>
Date: Thu, 5 Apr 2007 14:52:23 +0000 (+0000)
Subject: Fixed bug with uninitialized lastmod entries
X-Git-Tag: 0.72p4~21
X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=4cc3295c3967daa39a1fa45bac7f125bd473320e;p=cobramush.git

Fixed bug with uninitialized lastmod entries
(cherry picked from commit 5825791b8987d3caf14953e2970557b652d18ccf)
---

diff --git a/src/db.c b/src/db.c
index 4e398d0..fc31498 100644
--- a/src/db.c
+++ b/src/db.c
@@ -211,6 +211,7 @@ db_grow(dbref newtop)
       o->division.powergroups = NULL;
       o->warnings = 0;
       o->modification_time = o->creation_time = mudtime;
+      o->lastmod = NULL;
       o->attrcount = 0;
       initialized++;
     }
diff --git a/src/look.c b/src/look.c
index 530e70f..b54d17f 100644
--- a/src/look.c
+++ b/src/look.c
@@ -835,7 +835,8 @@ do_examine(dbref player, const char *name, enum exam_type flag, int all)
     if (!IsPlayer(thing)) {
       notify_format(player, T("Last Modification: %s"),
 		    show_time(ModTime(thing), 0));
-      if((Owner(thing) == Owner(player) )|| Director(player))
+      if(((Owner(thing) == Owner(player)) || Director(player))
+		&& LastMod(thing))
         notify_format(player, T("Modified: %s"), LastMod(thing));
     }
   }