Re: [NEWBIE] special proc "Joe Frohne" at Jul 17, 97 03:32:57 pm

From: tom2 (tom2@GOODNET.COM)
Date: 07/17/97


> Hi All,
> I have a special room proc im working on.  It is simple enough, you ask a
> mob a question and it responds with some gibberish.  The problem is, the
> code only works once.  If you ask the question again, it dosent seem to
> return anything.  I figure im not clearing or setting some variable.  Im
> not sure what tho.  Any hint/help is apprecitated.
>
It looks like you are exceeding the allocated space for your answer
buffer... maximum of 256 bytes.  All of the text appended to it by the
strcat() functions, together with the text which was originally in it due
to your initialization adds up to about 280 characters or so.  The results
of such a buffer overrun are not easily predicted, but the symptoms you
describe would be possible.  The solution to the problem is to increase
the size of your answer buffer (or else decrease the amount of text you
are putting into it).

Regards,
Tom Perry


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST