Re: str_cmp / strcasecmp (strdup!)

From: Thomas Arp (
Date: 09/04/02

From: "Mark Garringer" <zizazat@HOTMAIL.COM>
> >> I also made str_dup only exist if strdup doesn't.
> >
> >I don't think this is a good idea.  Part of the point of str_dup() is
> >it uses CircleMUD's memory management and thus exits with a descriptive
> >malloc() failure error rather than simply returning NULL and crashing.
> I hate to dust off a super old thread, but I am about to loose my mind
> some NULL crashing strdup crap!!!!!
> I'm running on SUSE 8.0, and I keep having problems with redit crashing if
> you try to save an empty room desc.

Actually I just fixed that bug yesterday myself. In genwld.c, in
copy_room_strings(), change:

 dest->description = strdup(source->description);
 dest->description = strdup(source->description ? source->description :

and the same with name.


   | FAQ: |
   | Archives: |
   | Newbie List:   |

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