Re: Crash problem

From: Chuck Reed (master@I-55.COM)
Date: 09/16/98


>#0  0x8072abc in hit (ch=0x82b85d0, victim=0x0, type=-1) at fight.c:835
>835       if (ch->in_room != victim->in_room) {

Victim is useless and you are trying to use it.  The problem is that they
are probably dead already, and you are still trying to use them.

Code:

// Add the following lines above the other code
  if(!ch || !victim)
    return;
  /* Do some sanity checking, in case someone flees, etc. */
  log("FIGHT: Sanity check");
  if (ch->in_room != victim->in_room) {
    log("FIGHT: ch->inroom != victim->in_room --> player not in room
anymore");
    if (FIGHTING(ch) && FIGHTING(ch) == victim)
      stop_fighting(ch);
    log("FIGHT: Sanity ok.. next hit");
    return;
  }

---------------------------------------
Chuck Reed      | Ash of Dark Horizon |
master@i-55.com | dh.gator.net 6001   |
---------------------------------------


     +------------------------------------------------------------+
     | 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/15/00 PST