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@theari.com>
Thu, 24 Mar 2011 15:58:45 +0000 (15:58 +0000)
(cherry picked from commit 5825791b8987d3caf14953e2970557b652d18ccf)

src/db.c
src/look.c

index ed277ddcfa6aa1eb799febe8049fdd98e825fdb7..a3d44ab5f3b2c5ea7f4cd12e9880a58b8880e07d 100644 (file)
--- a/src/db.c
+++ b/src/db.c
@@ -208,6 +208,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 54413e33a28a31415f8b331df482a682aacbb095..3db1408ff64f32a8c32bf9f544c77946d9ba8258 100644 (file)
@@ -836,7 +836,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));
     }
   }