[code] ASSERT screwing up hedit.

From: Matt Lowe (modem-burn@geocities.com)
Date: 12/05/98


        Well, I've had to change hedit a ton because it's really screwed
compaired to circle pl 14. In pl 14 thier is an index for all the help
files...if this is the same in the rest of the version I dunno. But the
way hedit works is it basiclly adds the one entry to the top of the
help index then write then entire index to a file. (Thierfor screwing
up everything because usally the help things are stored in many
different files) so I made this hedit put all the help entries into one
big .hlp file. Then it works properly except when some already
exists..... The only problem I'm having is when it tries to free the
help_table[position number]
So I take that part out where it tries to free the thing and it works
fine but i'd rather free it because I don't want tons of memory leaks.

exact code below:

Thanks,
Jourge


  rnum = OLC_ZNUM(d);
  /*
   * Help entry exists exists: free and replace it.
   */
  sprintf(buf, "%d %d", OLC_ZNUM(d), rnum);
  send_to_char(buf, d->character);
  if (rnum > 0) {
-> this screws it up here! ->    free_help(help_table + rnum);
    help_table[rnum] = *OLC_HELP(d);
        return;
  } else {                      /* Entry doesn't exist, hafta add it. */


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