From b24c409ceaba3d5f93e59c1394afee1aad8095ba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20D=C3=B6singer?= Date: Wed, 2 Jul 2008 15:27:46 -0500 Subject: [PATCH] wined3d: Initialize the state table before filling it. --- dlls/wined3d/state.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 1e698d6219c..41c5828546b 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -5418,6 +5418,11 @@ void compile_state_table(struct StateEntry *StateTable, memset(multistate_funcs, 0, sizeof(multistate_funcs)); + for(i = 0; i < STATE_HIGHEST + 1; i++) { + StateTable[i].representative = 0; + StateTable[i].apply = state_undefined; + } + for(type = 0; type < 3; type++) { /* This switch decides the order in which the states are applied */ switch(type) { -- 2.11.4.GIT