Fixed bug with uninitialized lastmod entries
authorAri Johnson <ari@cobramush.org>
Thu, 5 Apr 2007 14:52:23 +0000 (14:52 +0000)
committerAri Johnson <ari@cobramush.org>
Wed, 4 Apr 2007 05:49:46 +0000 (05:49 +0000)
(cherry picked from commit 5825791b8987d3caf14953e2970557b652d18ccf)

src/db.c
src/look.c

index 4e398d0837c7af26969416b500750f17f8791d07..fc314981df44eac7da61c94594153a2a19035119 100644 (file)
--- 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++;
     }
index 530e70faf60dd368cef92aef86af373eee7a765c..b54d17ff8bd372d0bf6d7846de6127240991b1fa 100644 (file)
@@ -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));
     }
   }