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

2013-01-02 Thread Matteo Bruni
2013/1/1 Rico Schüller kgbric...@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 = 0x;
+return token == 0x || token == 0xFFFE;
+}

This series looks good to me, but I'd prefer you use lowercase
hexadecimal constants in the future.




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

2013-01-02 Thread Jacek Caban
On 01/02/13 14:38, Matteo Bruni wrote:
 2013/1/1 Rico Schüller kgbric...@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 = 0x;
 +return token == 0x || token == 0xFFFE;
 +}

 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  0xfffe == 0xfffe;

Cheers,
Jacek