[PATCH 1/7] d3dx9: Handle invalid byte code in D3DXFindShaderComment().

Jacek Caban jacek at codeweavers.com
Wed Jan 2 07:55:24 CST 2013


On 01/02/13 14:38, Matteo Bruni wrote:
> 2013/1/1 Rico Schüller <kgbricola at web.de>:
>> ---
>>  dlls/d3dx9_36/shader.c       | 16 +++++++++++-----
>>  dlls/d3dx9_36/tests/shader.c | 21 +++++++++++++++++++++
>>  2 Dateien geändert, 32 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-)
>>
> +static inline BOOL is_valid_bytecode(DWORD token)
> +{
> +    token &= 0xFFFF0000;
> +    return token == 0xFFFF0000 || token == 0xFFFE0000;
> +}
>
> This series looks good to me, but I'd prefer you use lowercase
> hexadecimal constants in the future.

While you are at this, it may be simplified to:

return token & 0xfffe0000 == 0xfffe0000;

Cheers,
Jacek



More information about the wine-devel mailing list