[CF-Devel] attach.h question
crossfire-devel-admin at archives.real-time.com
crossfire-devel-admin at archives.real-time.com
Mon Sep 22 23:25:58 CDT 2003
Nicolas Weeger wrote:
>
There's a weird thing in the code, in attack.h:
>
>
#define num_resist_table 21
>
>
Except there are only 20 attack types as defined by resist_table...
>
And that's an issue, at least under Windows, because in
>
common/treasure.c there is
>
>
resist=RANDOM() % num_resist_table;
>
>
followed by
>
>
while (op->resist[resist_table[resist]]!=0 && b<4) {
>
>
So 'resist' can be 20, on the other hand resist_table (in attack.h) has
>
only 20 elements.
>
And that crashes (assertion failure you can ignore, but still) straight
>
under Windows, randomly.
>
>
Sounds to me there's a mistake here :)
Fixed in CVS. I broke this because I was originally adding two new attack
types as part of the spell/skill stuff, but only added one and forgot to remove
that entry.
_______________________________________________
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