Man this is driving me nuts

From: Hades (
Date: 04/20/96

I am having a massive problem, here are the structs. They are for talking
mobs on my mud, and it works liek this:
say mob hi
if hi is a keyword in the talk-rec list, it says the say. If keep_talking !=
null it'll go through THAT linked list and say those things.

struct continue_rec {
  char *say;
  struct continue_rec *next_say;

struct talk_rec {
  char *keyword;
  char *say;
  struct continue_rec *keep_talking;
  struct talk_rec *next;

And in char_data:

struct talk_rec *says;

Now when I olc, all I want to do is move ->says from the prototype to the
new prototype, and then free the old proto, and in my last mail ya'll said
that freeing a mob would not junk any linked lists/things that were in
pointers. WELL when I do that the says list gets all wacked. Well actually
no, the inital list (talk_rec) holds itself fine, but the secondary list off
the first (continue_rec) gets trashed. For some reason, reassigning a
pouinter to the viry first 'says' in that list, will that have any effect on
the contents of that list? no, didnt think so. So why is the inner linked
list getting trashed? Any ideas?

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