Strange String BUG

From: Tony Robbins [Kupek] (tonyr@NWPACLINK.COM)
Date: 09/19/98


Ok, now you know why I'm hating strings.  Somehow, in this amount of code:

(from read_aliases(), standard alias package)
    /* get alias file name */
    log(GET_NAME(ch));
    get_filename(GET_NAME(ch), pcFileName, ALIAS_FILE);

the log() works fine, but get_filename insists that GET_NAME(ch) is
NULL/0x0.

The stranger part is, this is only when loading a character via playerlink
(linkload).  The pertinent code:

    CREATE(victim, struct char_data, 1);
    clear_char(victim);
    if (load_char(vict, &tmp_store) > -1) {
      store_to_char(&tmp_store, victim);
      if (GET_LEVEL(victim) <= GET_LEVEL(ch)) {
        victim->next = character_list;
        character_list = victim;
        victim->desc = NULL;
        char_to_room(victim, ch->in_room);
        read_aliases(victim);  <---- crashes here.

FYI, vict is a char string containing the name of the player to be loaded.
This suddenly stopped working when I used the CVS snapshot, if that
matters (perhaps my clear_char is messed up, but then why does it count it
as there on one line, and NULL the next ?).

-B.


[-------------------------------------------]
  Tony Robbins, <tonyr@nwpaclink.com>
  LakeView Technologies, Inc.
[-------------------------------------------]


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