From 95bdd7f86d3525bf872bb7855dede25a5d2b7b70 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Fri, 20 Jul 2018 21:45:53 +0200 Subject: [PATCH] d3d8: Use the ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- 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 c967a33d8c6..364798f79b3 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.11.4.GIT