Well, if you check string.c (brian), you would notice:
char *format_string( char *oldstring /*, bool fSpace */)
Which is the start of the format_string function...
You will notice it returns a char *, which is simply a str_dup copy of
the formatted string:
free_string(oldstring);
return(str_dup(xbuf));
And it frees your old string, which would be your problem. So, change
your formatting part this:
pRoom->wild_desc = str_dup(string_buf); // you could just put
the str_dup in
// the format_string call
directly...
pRoom->wild_desc = format_string(pRoom->wild_desc);
send_to_char(pRoom->wild_desc, ch);
free_string(pRoom->wild_desc);
return;
Ammaross Danan
<snip>
Could you give maybe a brief example of those two cases or point me to
where I could locate this info on my own? No problem rewriting the
function if necessary. I'm looking for utmost reliability, which I
think we all pretty much are.
</snip>