From: Ari Johnson <ari@theari.com>
Date: Thu, 7 Jun 2007 23:18:08 +0000 (+0000)
Subject: attrib_set(obj/attr,) with EMPTY_ATTRS off sets the attribute to a single space
X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=bb184b1cfb1b3cafc64fb6f1198bff2bb5c4a61e;p=cobramush.git

attrib_set(obj/attr,) with EMPTY_ATTRS off sets the attribute to a single space
---

diff --git a/game/txt/changes/0.73 b/game/txt/changes/0.73
index 96e9c5c..f1f600b 100644
--- a/game/txt/changes/0.73
+++ b/game/txt/changes/0.73
@@ -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]
 
diff --git a/src/fundb.c b/src/fundb.c
index e416168..b6665d9 100644
--- a/src/fundb.c
+++ b/src/fundb.c
@@ -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);
   }