attrib_set(obj/attr,) with EMPTY_ATTRS off sets the attribute to a single space
authorAri Johnson <ari@theari.com>
Thu, 7 Jun 2007 23:18:08 +0000 (23:18 +0000)
committerAri Johnson <ari@theari.com>
Thu, 24 Mar 2011 15:58:45 +0000 (15:58 +0000)
(cherry picked from commit bb184b1cfb1b3cafc64fb6f1198bff2bb5c4a61e)

game/txt/changes/0.73
src/fundb.c

index 96e9c5c3b3fda64a50bdda35ba77589a2fdefbf4..f1f600bc123b25d0808c87f86afc3f78b86abaf0 100644 (file)
@@ -199,4 +199,6 @@ CobraMUSH Version 0.73
    * @poll with no argument now displays the current poll; use
      @poll/clear to clear it [AEJ]
    * default() can take multiple attributes to try in order [AEJ]
+   * attrib_set(obj/attr,) with EMPTY_ATTRS off sets the attribute to a
+     single space [AEJ]
 
index e416168db577d04699c9b7db48dc4a93603b5bd9..b6665d9869e9e90244b000d3c47d9c952c982ea6 100644 (file)
@@ -1939,6 +1939,8 @@ FUNCTION(fun_attrib_set)
   }
   if (nargs == 1) {
     do_set_atr(thing, s, NULL, executor, 1);
+  } else if (strlen(args[1]) == 0 && !EMPTY_ATTRS) {
+    do_set_atr(thing, s, " ", executor, 1);
   } else {
     do_set_atr(thing, s, args[1], executor, 1);
   }