http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Potential Crash?



Hi,

I just want to know if this code is valid:

TILE *t = blah..;

if ((t) && (t->number)) blahhh...

Could this crash on some compilers if 't' is NULL? Or do ALL compilers
evaluate this from left to right and stop if one of the clauses are false?

Thanks
Jörg Rüppel

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html