Re: bug..?

From: George Greer (greerga@circlemud.org)
Date: 04/09/99


On Fri, 9 Apr 1999, David Taylor wrote:

>No.. You check 'if (pointer)' which checks if the value of the pointer is
>or is not null.
>
>If you clear the mob, the pointer would still point to memory, but the
>memory pointed to be would be null, the check for that would be
>
>if (*pointer)
>
>Which dereferences the pointer, and checks the value pointed to by
>pointer.

I would urge you not to do that because you will get bitten by that later.

Memory tends to get reused and as such will not stay NUL'd forever. Not
NULL, NUL. Completely different entities.[1]

--
George Greer            | Death's Gate Scripts
greerga@circlemud.org   | http://www.mindspring.com/~heilpern/dg_scripts/

[1] Ok, they both happen to have a value of 0, but that's not the point.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



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