[Newbie] Overflow?

From: Kristof Reline (kristof.reline@usa.net)
Date: 10/09/00


I've just put in a while loop in hit() in fight.c, which is causing
my mud to crash. With a loop of greater than 50 repeats it results in
an OVERFLOW warning sent to the player in place of combat text and also
crash, with over 30 repeats it simply crashes, and with over 10 (possibly
20) it crashes after a period of reuse.

The loop calls simple_hit() - a clone of hit() - from within hit().
The loop is enabled by an AFF_xxx flag.
OS is Win98, Compiler BCC 5.5.

I don't want a fix, I'd like to know if anyone can point me to why an
overflow would be created, or where a buffer is being abused, or whatever
it is I'm doing wrong, if apparent from the above.

Much appreciated,
Kristof

PS: Are my lines wrapping too late?

--sn--
> More than likely that means that the value of ch is invalid and hence
> your program is trying to access an area of memory which is off-limits
> (this is commonly known as a segmentation fault).
>
> Regards, Peter
--sn--

Eww I just isolated (and quarantined ;) ) one of those, still fixing it
(thanx Peter for the pointer previously) :)

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1


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



This archive was generated by hypermail 2b30 : 04/10/01 PDT