[CODE] bug fix in zedit new

From: Andrew Helm (ashe@IGLOU.COM)
Date: 07/29/97


There are two bugs in zedit.c, in the function zedit_new_zone().
Find the lines that read:

  /*. Make a new zone in memory.*/
  CREATE(new_table, struct zone_data, top_of_zone_table);
  new_table[top_of_zone_table + 1].number = 32000;
  for(i = 0; i <= top_of_zone_table + 1; i++)
    if(!found)
      if (i > top_of_zone_table || zone_table[i].number > vzone_num)
      { found = 1;


The first bug is in the line that reads:
   CREATE(new_table, struct zone_data, top_of_zone_table);

Change this line to:
   CREATE(new_table, struct zone_data, top_of_zone_table+2);


The next bug is in the line that reads:
   for(i = 0; i <= top_of_zone_table + 1;i++);

Change this line to
   for(i = 0; i <= top_of_zone_table;i++);


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