Re: hmm...

From: Akuma/Chris Baggett/DOOMer (doomer@BAYOU.COM)
Date: 01/23/98


At 02:09 AM 1/23/98 -0700, you wrote:
>
>Ok, question for you on this....what about these 2 lines?
>
>          free(GET_NAME(d->character));
>          GET_NAME(d->character) = NULL;
>
>Are they moved or removed?
>

moved.

>This is what I had when I moved the 2 lines above as said....
>
>        if (PLR_FLAGGED(d->character, PLR_DELETED)) {
>          /* We get false positive from the original deleted name. */
>          free_char(d->character);
>          CREATE(d->character, struct char_data, 1);
>          free(REAL_NAME(d->character));
>          REAL_NAME(d->character) = NULL;

switch the positions of the  free_char/CREATE with
the positions of the free/REAL_NAME.
think about it, you must free the name before you can free the character.
anyway, think before ya ask. l8r.


ie:
           free(REAL_NAME(d->character));
           REAL_NAME(d->character) = NULL;
           free_char(d->character);
           CREATE(d->character, struct char_data, 1);
>          /* Check for multiple creations... */
>          if (!Valid_Name(tmp_name)) {
>            SEND_TO_Q("Invalid name, please try another.\r\nName: ", d);
>            return;
>          }
>          clear_char(d->character);
>          CREATE(d->character->player_specials, struct
>player_special_data, 1);

Code On
Akuma the Raging Coder
  +------------------------------------------------------------+
  | "The poets talk about love, but what I talk about is DOOM, |
  |      because in the end, DOOM is all that counts." -       |
  |   Alex Machine/George Stark/Stephen King, The Dark Half    |
  |        "Nothing is IMPOSSIBLE, Just IMPROBABLE"            |
  |   "Easier Said Than Done, But Better Done Than Said..."    |
  +------------------------------------------------------------+


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