Fix another empty array literal for MSVC compatibility

This commit is contained in:
Max Brunsfeld 2019-08-12 14:50:24 -07:00
parent 276d3cb5ad
commit 5f369a5870
2 changed files with 2 additions and 2 deletions

View file

@ -779,7 +779,7 @@ pub(crate) fn build_parse_table(
states: Vec::new(),
symbols: Vec::new(),
production_infos: Vec::new(),
max_aliased_production_length: 0,
max_aliased_production_length: 1,
},
}
.build()?;

View file

@ -367,7 +367,7 @@ impl Generator {
// Work around MSVC's intolerance of empty array initializers by
// explicitly zero-initializing the first element.
if i == 0 {
add_line!(self, "[0] = {{}},");
add_line!(self, "[0] = {{0}},");
}
continue;
}