The Watermelon schreef: > On 6/22/07, Giel van Schijndel <[EMAIL PROTECTED]> wrote: >> >> The Watermelon schreef: >>> a minor fix to avoid excessive harmless asserts by projectile validity >>> check macro when using memory debugger like MSVC when debugging. >> I assume the problem you're trying to fix with this patch is that >> psAttacker = NULL at some times, and dereferencing this to retrieve >> ->psSource and ->psDest results in a segmentation fault? >> >> PS the first portion of your patch is whitespace only, this was quite >> annoying in reviewing your patch. > > yes it's a potential crash,though psAttacker should never be > NULL,unless you > fire a projectile with a script function.I think I forgot to include the > changes which actually reduce the assert spam... Well this patch would actually prevent a segfault if a NULL pointer ever made it through that codepath. > not sure what you mean by 'the first portion of your patch is > whitespace only'. I mean this part: > - psObj->airTarget = (UBYTE)( ( psTarget != NULL && > - psTarget->type == OBJ_DROID && > - vtolDroid((DROID*)psTarget) ) || > - ( psTarget == NULL && > - (SDWORD)tarZ > map_Height(tarX,tarY) ) ); > + psObj->airTarget = (UBYTE)( (psTarget != NULL && > + > psTarget->type == OBJ_DROID && > + > vtolDroid((DROID*)psTarget)) || > + > (psTarget == NULL && > + > (SDWORD)tarZ > map_Height(tarX,tarY)) ); > It adds a few tabs, removes some spaces and that's it.
-- Giel
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev