>[snip] > >>I tried this. It crashes mine on if(GET_NAME(dt->character) && >>!str_cmp(GET_NAME(dt->character), newname)). But simply doing a check >like: > > >Maybe your compiler doesn't optimize the evaluation of if-conditions. Some >compilers >don't stop at the first false of an AND. Hmm... is it not standard to do so? In the C books I've read, I'm sure they said that if the first expression in an AND statement is false, the rest never gets evaluated. Which is why something like if (x == 0 && y++) { whatever } may produce unexpected results if x != 0 and should be avoided. Ah, but my memory isn't the greatest anymore, so I could just be mis-remembering what I've read ;) +------------------------------------------------------------+ | 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