From 114bb54324f22cb53bcd14607234d0acd74d37bd Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Thu, 19 Mar 2009 22:38:01 +0000 Subject: slang: initialize the context --- src/mesa/shader/slang/slang_compile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/shader/slang') diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index aa08022869..fb7128841c 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2056,6 +2056,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, /* emit code for global var decl */ if (C->global_scope) { slang_assemble_ctx A; + memset(&A, 0, sizeof(slang_assemble_ctx)); A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -2073,7 +2074,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, if (C->global_scope) { if (var->initializer != NULL) { slang_assemble_ctx A; - + memset(&A, 0, sizeof(slang_assemble_ctx)); A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -2415,7 +2416,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, if (mainFunc) { /* assemble (generate code) for main() */ slang_assemble_ctx A; - + memset(&A, 0, sizeof(slang_assemble_ctx)); A.atoms = C->atoms; A.space.funcs = o.funs; A.space.structs = o.structs; -- cgit v1.2.3