Parser: Initialise geometry elements for VarDecl

We were using uninitialised memory whilst parsing geometry, leaving
random contents as the return for shape/overlay/etc sections.  Somehow
this actually worked everywhere but under Java.

https://bugs.freedesktop.org/show_bug.cgi?id=57913

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
master
Daniel Stone 2012-12-06 15:04:15 +11:00
parent f159846943
commit bb620df7aa
1 changed files with 3 additions and 3 deletions

View File

@ -325,9 +325,9 @@ Decl : OptMergeMode VarDecl
$2->merge = $1;
$$ = &$2->common;
}
| OptMergeMode ShapeDecl { }
| OptMergeMode SectionDecl { }
| OptMergeMode DoodadDecl { }
| OptMergeMode ShapeDecl { $$ = NULL; }
| OptMergeMode SectionDecl { $$ = NULL; }
| OptMergeMode DoodadDecl { $$ = NULL; }
| MergeMode STRING
{
$$ = &IncludeCreate(param->ctx, $2, $1)->common;