Fixed can_write_attr_internal() to prohibit writing attributes that the player cannot...
authorAri Johnson <ari@cobramush.org>
Thu, 14 Feb 2008 16:05:50 +0000 (16:05 +0000)
committerAri Johnson <ari@cobramush.org>
Thu, 14 Feb 2008 16:05:50 +0000 (16:05 +0000)
game/txt/changes/0.72p4
src/attrib.c

index f8c1a38b9425cee62ab1364405d9e7d0dfc3f710..f4f0892e374979d65e730d5b123cd77e26969cdb 100644 (file)
@@ -29,4 +29,6 @@ CobraMUSH Version 0.72p4
     * Fixed possible crash in trim_space_sep() [AEJ]
     * Fixed attribute flag mortal_dark [AEJ]
     * Fixed attribute read locks [AEJ]
+    * Fixed can_write_attr_internal() to prohibit writing attributes that
+      the player cannot read [AEJ]
 
index 7958479dda7bfa4d77604ee98b432407de113349..3c7c7a6761aadffec1a93506dbfb2b8ec94c2c9a 100644 (file)
@@ -2231,6 +2231,8 @@ can_write_attr_internal(dbref player, dbref obj, ATTR * atr, int safe)
 {
   char *p;
   missing_name[0] = '\0';
+  if (!can_read_attr_internal(player, obj, atr))
+    return 0;
   if (Cannot_Write_This_Attr(player, atr, obj, safe, !atr_match(atr->name), AL_CREATOR(atr)))
     return 0;
   strcpy(missing_name, AL_NAME(atr));