[CF-Devel] Traps not working reliable
crossfire-devel at archives.real-time.com
crossfire-devel at archives.real-time.com
Sun Sep 19 11:41:22 CDT 2004
Mark Wedel wrote:
>
That seems bad. Taking a very quick look at the code (for all other
>
uses of MAX), I'm a little concerned with random_roll() and die_roll()
>
which is pasiing RANDOM() into MAX (actually, it passes it into MIN,
>
which is inside a MAX construct).
I fixed these two functions by adding an explicit "ran = RANDOM()"
outside the macro calls.
I could not find any other macros which use their arguments more than
once and are called with arguments having side-effects.
Besides that, I added parentheses around arguments to a few other macro
definitions. (None of the calls were indeed broken but the parentheses
make the definitions more robust.)
_______________________________________________
crossfire-devel mailing list
crossfire-devel at lists.real-time.com
https://mailman.real-time.com/mailman/listinfo/crossfire-devel
More information about the crossfire
mailing list