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>
Wed, 4 Apr 2007 05:49:46 +0000 (05:49 +0000)
(cherry picked from commit c7dfe1f2725598c996254217e16e3b41ff42ee2e)

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 31087d12c74a97837573f054c3734036476b0ec8..42dce7026c5f71135779b1c470a577bf7787af8d 100644 (file)
@@ -2173,6 +2173,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));