MAX_SPELLS / MAX_SKILLS (crash)

From: I Chose No Name (MUDaholic@AOL.COM)
Date: 08/20/98


Okay, I changed MAX_SPELLS to 430, MAX_SKILLS to 600, and TYPE_SUFFERING to
799 and changed all the SKILL_X to 4XX and TYPE_X to 7XX and when I boot up,
here's what happens:

...
Thu Aug 20 13:00:43 :: Sorting command list and spells.
<CRASHES HERE>

here's the code:
---
int spell_sort_info[MAX_SKILLS+1];
extern char *spells[];
void sort_spells(void) {
  int a, b, tmp;

  /* initialize array */
  for (a = 1; a < MAX_SKILLS; a++)
    spell_sort_info[a] = a;

  /* Sort.  'a' starts at 1, not 0, to remove 'RESERVED' */
  for (a = 1; a < MAX_SKILLS - 1; a++)
    for (b = a + 1; b < MAX_SKILLS; b++)
      if (strcmp(spells[spell_sort_info[a]], spells[spell_sort_info[b]]) > 0)
{
        tmp = spell_sort_info[a];
        spell_sort_info[a] = spell_sort_info[b];
        spell_sort_info[b] = tmp;
      }
}
---
help plz :)


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