Hello, My question is regarding bust_a_prompt and the %e (show exits in prompt) option.
I know it works properly, because it's stock and there have never been any complaints about it on other muds (that I've seen). However, we've run into some problems with it over the years. Just to give a little backup information, any prior changes to the mud were not done by me, so I have no way of checking anything changed recently. It's been doing this for quite some time. Particularly, I've noticed we have buf as MAX_STRING_LENGTH. Further down, there is a check to see if str is null, and if so it sets to buf to a default prompt of <%ldhp %dm %dmv>. This is all good and well, and I understand this. However, when you check for case 'e' (again, to show exits in the prompt) there's a strcat for "none" if no exits are found. Why does it use buf, exactly? I realize it may be more efficient, since it does in fact work. This is confusing for me and I'm hoping one of you may have some insight. The problem we're having involves this instance of the word none. Every now and then some things will start showing up like "nonenonenone". It could be titles, roomins, descriptions, sockets.. just about anything relating to char_data. It's not always "nonenonenone". Sometimes it will be simply "none", or perhaps "onenonenonenone".. many possibilities, really. Other times, we'll crash and ch is 0x6e6f6e65, or maybe 0x6f6e656e. It's related to bust_a_prompt because I've determined that's where the "none" is coming from. Like I said, I know the problem isn't within bust_a_prompt. For the sake of keeping these strange occurences from happening though, I've commented it out until I've got the problem nailed down. If any of you could lend me some insight as to why buf is used as it is, that may help me track the problem down. Or better yet, why nonenone is happening in the first place. I apologize if my description isn't very clear, but I'll gladly send more information if need be. I don't have a gdb readout because that section of the code is commented out, and the problem is no longer happening. I suspect it will simply manifest itself elsewhere, though. Thanks for your time, Jimmy

