Nozomi Kodama : d3dx9_36/tests: Avoid a potential out of bound access.
Alexandre Julliard
julliard at winehq.org
Wed Oct 3 13:20:35 CDT 2012
Module: wine
Branch: master
Commit: 9c823d04b6cd159b1d7251c7c654245f1177ddf3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9c823d04b6cd159b1d7251c7c654245f1177ddf3
Author: Nozomi Kodama <nozomi.kodama at yahoo.com>
Date: Tue Oct 2 14:12:27 2012 +0800
d3dx9_36/tests: Avoid a potential out of bound access.
---
dlls/d3dx9_36/tests/math.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c
index d56e38d..761b832 100644
--- a/dlls/d3dx9_36/tests/math.c
+++ b/dlls/d3dx9_36/tests/math.c
@@ -2818,10 +2818,10 @@ static void test_D3DXSHRotateZ(void)
{
/* order = 0 or order = 1 behaves like order = D3DXSH_MINORDER */
square = ( order <= D3DXSH_MINORDER ) ? D3DXSH_MINORDER * D3DXSH_MINORDER : order * order;
- expected = table[36 * j + i];
if ( i >= square || ( (order >= D3DXSH_MAXORDER) && ( i >= D3DXSH_MAXORDER * D3DXSH_MAXORDER ) ) )
expected = ( i + 1.0f ) * ( i + 1.0f );
-
+ else
+ expected = table[36 * j + i];
ok(relative_error(out[i], expected) < admitted_error, "angle %f, order %u index %u, Expected %f, received %f\n", angle[j], order, i, expected, out[i]);
}
}
More information about the wine-cvs
mailing list