Re: Autoexits problem

From: Mike Stilson (mike@velgarian.sytes.net)
Date: 09/10/02


On Sun, Sep 08, 2002 at 09:48:24PM -0400, Mike Stilson wrote:

Hate replying to myself, but I forgot to tell you to check *buf:

>>         sprintf(buf + strlen(buf), " %s(Closed),", capdirs[door]);
>>       else
>>         sprintf(buf + strlen(buf), " %s,", capdirs[door]);
>>     }
+    if(*buf) /* Since *buf = '\0' above, if it isn't, then we've written to it. */
+      buf(strlen(buf)-1) = '\0';  /* Smash the comma which is the last char in buf */
-    sprintf(buf2, "&cExits:%s.&n\r\n", ((*buf) ? buf : " None"));
+    send_to_char(ch, "&cExits:%s.&n\r\n", (*buf)?buf:"None")); /* Don't need buf2 for this */

-me

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT