Gerard Krol schreef:
> Hi,
>
> I'm pleased to say that Warzone seems to run fine on AMD64, that is,
> after applying the attached patch.
>
> For a return type of "bool" (integer value 0) the array gets accessed
> with a negative index of -11. This just goes unnoticed most of the
> time I guess, but I was lucky to experience a segfault.
>
> - Gerard
> ------------------------------------------------------------------------
>
> Index: lib/script/script_lexer.l
> ===================================================================
> --- lib/script/script_lexer.l (revision 722)
> +++ lib/script/script_lexer.l (working copy)
> @@ -257,7 +257,14 @@
>       BOOL    object;
>  
>       // See if this is an object pointer
> -     object = asScrTypeTab[psFunc->retType - VAL_USERTYPESTART].accessType 
> == AT_OBJECT;
> +     if (!asScrTypeTab || psFunc->retType < VAL_USERTYPESTART)
> +     {
> +             object = FALSE;
> +     }
> +     else
> +     {
> +             object = asScrTypeTab[psFunc->retType - 
> VAL_USERTYPESTART].accessType == AT_OBJECT;
> +     }
>  
>       if (object)
>       {
Applied in r724.

-- 
Giel

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to