Skip to content

Commit

Permalink
Revert and properly fix this problem with sometimes uninitialized fie…
Browse files Browse the repository at this point in the history
…lds.

They are initialized in mode Reclaim2, when site_info isn't empty too.
  • Loading branch information
angavrilov committed Jul 8, 2015
1 parent 3b43c8c commit a56692a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion StructFields.pm
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ sub render_field_metadata_rec($$) {
my @items = $field->findnodes('ld:item');
my $count = 0;
$count |= 1 if is_attr_true($field, 'is-array');
$count |= 2 if $in_union;
$count |= 2 if $in_union || is_attr_true($field, 'has-bad-pointers');

push @field_defs, [ "${FLD}(POINTER, $name)", auto_identity_reference($items[0]), $count, $enum ];
} elsif ($meta eq 'static-array') {
Expand Down
4 changes: 2 additions & 2 deletions df.viewscreen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@
<stl-vector name="available_civs" pointer-type="historical_entity"/>

<stl-vector name='site_info' pointer-type='stl-string' comment='v0.40.01'/>
<int32_t name="unk_9c" comment='v0.40.01'/>
<int32_t name="unk_a0" comment='v0.40.01'/>
<pointer name="site_abandoned" type-name="history_event" has-bad-pointers='true' comment='v0.40.01'/>
<pointer name="site_created" type-name="history_event" has-bad-pointers='true' comment='v0.40.01'/>
<int32_t name="unk_a4" comment='v0.40.01'/>

<compound name='finder'>
Expand Down

0 comments on commit a56692a

Please sign in to comment.