Re: [CODE] Bugfix

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


>Here's what I got:
>
>struct descriptor_data *dt;
>
> for (dt = descriptor_list; dt; dt = dt->next)
>   if(dt)
>     if(GET_NAME(dt->character) && !strcmp(GET_NAME(dt->character), newname))
>       return FALSE;
>
>Now without the if(dt) it will crash, so I'm guessing it's null.  Just urm,
>dont know what to do about it :)

I don't know if this assumption is correct, but it usually works for
everything else.  Some compilers (I'm assuming) require a 'dt != NULL'
in there, instead of just 'dt'.
GCC doesn't have this problem as far as I know, but other compilers ya
never know.  like some require a break; statement EVEN
after a return; statement in a switch() {}

shrug, wild guess.  Don't flame me if I'm wrong, just correct me :-)

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