Page_string and switched mobs.

From: Angus Mezick (angus@EDGIL.CCMAIL.COMPUSERVE.COM)
Date: 03/09/98


Is it just me, or do switched mobs using commands that call page_string crash
everyone's mud?  I had to go into modify.c and add this:

void paginate_string(char *str, struct descriptor_data *d)
{
   int i;

   if (d->showstr_count)
      *(d->showstr_vector) = str;

   for (i = 1; i < d->showstr_count && str; i++)
      {
      if(d->original)
    str = d->showstr_vector[i] = next_page(str,
d->original->char_specials.screensize - 2);
      else
    str = d->showstr_vector[i] = next_page(str,
d->character->char_specials.screensize - 2);
      }
   d->showstr_page = 0;
}


/* The call that gets the paging ball rolling... */
void page_string(struct descriptor_data *d, char *str, int keep_internal)
{
   if (!d)
      return;

   if (!str || !*str)
      {
      send_to_char("", d->character);
      return;
      }
   if(d->original)
      CREATE(d->showstr_vector, char *, d->showstr_count = count_pages(str,
d->original->char_specials.screensize));
   else
      CREATE(d->showstr_vector, char *, d->showstr_count = count_pages(str,
d->character->char_specials.screensize));

.
.
.
}

notice the 2 d->original's.  DOH!
--Angus


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