[code] quick question.

From: Desmond Daignault (tekdd@DTOL.DATATIMES.COM)
Date: 11/07/97


I have a function that scrolls through all of the mobs/players in a room
that keeps breaking when doing a tch->next_in_room;

The core file and purify both indicate a memory segment violation.  is
there a way to detect a possible memory segment violation and prevent it?

The tch pointer seems to be a valid pointer. and when i play computer
using gdb, the world[ch->in_room].people->next_in_room->next_in_room...
works fine all the way to the last player/mob in the room which shows NULL
as the next_in_room.

the for statement used is:
for(tch = world[ch->in_room].people;tch; tch = next_tch)
and it dies doing:
  next_tch = tch->next_in_room;

*shrug*

--

Dez.

void signature () {
  printf ("Praise not the day until evening has come; a woman\n"
          "until she is burnt; a sword until it is tried; a maiden until\n"
          "she is married; ice until it has been  crossed; beer until it\n"
          "has been drunk.   -- Viking Proverb\n");
}


     +------------------------------------------------------------+
     | 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