From: Roland Scheidegger Date: Thu, 29 Nov 2007 02:08:18 +0000 (+0100) Subject: make sure state token values are fully initialized X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8dc188485be27dee7a3f2d1cc47527e183d7ee17;p=mesa.git make sure state token values are fully initialized --- diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c index 3360fef5851..eaa395048d4 100644 --- a/src/mesa/shader/arbprogparse.c +++ b/src/mesa/shader/arbprogparse.c @@ -1768,7 +1768,7 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst, { GLint idx; GLuint err = 0; - gl_state_index state_tokens[STATE_LENGTH]; + gl_state_index state_tokens[STATE_LENGTH] = {0, 0, 0, 0, 0}; GLfloat const_values[4]; switch (*(*inst)++) { diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c index 9e3d3fecf22..46d30872e4f 100644 --- a/src/mesa/shader/prog_parameter.c +++ b/src/mesa/shader/prog_parameter.c @@ -384,7 +384,7 @@ sizeof_state_reference(const GLint *stateTokens) * PARAM ambient = state.material.front.ambient; * * \param paramList the parameter list - * \param state an array of 6 (STATE_LENGTH) state tokens + * \param stateTokens an array of 5 (STATE_LENGTH) state tokens * \return index of the new parameter. */ GLint