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 <huw@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2017-03-15 16:50:19 +00:00 committed by Alexandre Julliard
parent 8bc68f3491
commit 7b32c8ab3e

View File

@ -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)");