[PATCH] d3d8: Use the ARRAY_SIZE() macro
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/d3d8/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index c967a33d8c..364798f79b 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2126,7 +2126,7 @@ static HRESULT WINAPI d3d8_device_GetTextureStageState(IDirect3DDevice8 *iface, TRACE("iface %p, stage %u, state %#x, value %p.\n", iface, stage, Type, value); - if (Type >= sizeof(tss_lookup) / sizeof(*tss_lookup)) + if (Type >= ARRAY_SIZE(tss_lookup)) { WARN("Invalid Type %#x passed.\n", Type); return D3D_OK; @@ -2152,7 +2152,7 @@ static HRESULT WINAPI d3d8_device_SetTextureStageState(IDirect3DDevice8 *iface, TRACE("iface %p, stage %u, state %#x, value %#x.\n", iface, stage, type, value); - if (type >= sizeof(tss_lookup) / sizeof(*tss_lookup)) + if (type >= ARRAY_SIZE(tss_lookup)) { WARN("Invalid type %#x passed.\n", type); return D3D_OK; -- 2.14.4
participants (2)
-
Henri Verbeet -
Michael Stefaniuc