[Circle] [code][descrips]

From: invincibill (long@hercules.ntsource.com)
Date: 11/21/96

i am having a prob...not sure why tho...could i get some help?

i want to set it so that i can have a descrip on my players of at least
one page.  the code i have now causes some bad memory stuff...
this is from interpreter.c..the login menu case stmt...

    case 'd':
    case 'D':
      SEND_TO_Q("Enter the text you'd like others to see when they look
at you.$
      SEND_TO_Q("Terminate with a '@' on a new line.\r\n", d);
      if (d->character->player.description) {
        SEND_TO_Q("Old description:\r\n", d);   
        SEND_TO_Q(d->character->player.description, d); 
/*      d->character->player.description = NULL;*/   
      CREATE(d->character->player.description, char, 8192);
      d->str = &d->character->player.description; 
      d->max_str = MAX_STRING_LENGTH;/*max str length = 8192*/
      STATE(d) = CON_EXDESC; 

shouldnt this work??  free the old address...create a pointer to another
with plenty of memory and reassign old pointer to the new address.  it
works fine for smaller descrips..but the big ones mess it all up and
totally corrupt my char data...

any help would be VERY much appreciated...

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |

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