Skip to content

Commit

Permalink
Fix residencestring being empty crash
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Oct 14, 2023
1 parent 2a002ee commit 178d3fa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -5409,8 +5409,10 @@ sub print_person
year(date => $date);
$spdeath_dt = undef;
}
push @phrases, $phrase;
$phrase = Data::Text->new();
if($phrase->length()) {
push @phrases, $phrase;
$phrase = Data::Text->new();
}
}
}
}
Expand All @@ -5433,7 +5435,6 @@ sub print_person
if(scalar(@phrases)) {
my $text = conjunction(map { $_->as_string() } @phrases);
if(!defined($text)) {
print STDERR Data::Dumper->new([\@phrases]);
die $person->as_string({ include_years => 1 }), ': BUG: residencestring array is unexpectedly empty';
}
$text =~ s/[\,;]\s*$//;
Expand Down

0 comments on commit 178d3fa

Please sign in to comment.