From 7b32c8ab3ea4df7d57222b9f9923d2cb7142ea38 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 15 Mar 2017 16:50:19 +0000 Subject: [PATCH] wined3d: Zero-initialize count. This prevents the loop below accessing beyond multisample_types if the GL_NUM_SAMPLE_COUNTS call fails. Signed-off-by: Huw Davies Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 3f9c0129538..dd78583324c 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2803,6 +2803,7 @@ static void query_internal_format(struct wined3d_adapter *adapter, { if (gl_info->supported[ARB_INTERNALFORMAT_QUERY]) { + count = 0; GL_EXTCALL(glGetInternalformativ(GL_RENDERBUFFER, format->glInternal, GL_NUM_SAMPLE_COUNTS, 1, &count)); checkGLcall("glGetInternalformativ(GL_NUM_SAMPLE_COUNTS)");