Skip to content

Commit

Permalink
Missed printing when someone lived with their parent(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Oct 31, 2024
1 parent 0b06a2b commit f1d6d87
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -5242,6 +5242,8 @@ sub print_person
if((datecmp($rdate, $mdate) == 0) && $road && ($mr->place() eq $residence->place())) {
if($p eq $place) {
$living_with{'mother'} = $mother;
$with_mother++;
$living_alone = 0;
last;
} elsif(my $mroad = $mr->address()) {
if($mroad eq $address) {
Expand Down Expand Up @@ -5287,6 +5289,8 @@ sub print_person
if((datecmp($rdate, $fdate) == 0) && $road && ($fr->place() eq $residence->place())) {
if($p eq $place) {
$living_with{'father'} = $father;
$with_father++;
$living_alone = 0;
last;
} elsif(my $froad = $fr->address()) {
if($froad eq $address) {
Expand Down Expand Up @@ -5343,7 +5347,7 @@ sub print_person
($sex eq 'M' ? 'his' : 'her');
}
} else {
$residencestring =~ s/,$//;
$residencestring =~ s/,\s*$//;
$residencestring .= i18n(' and');
}
$printed_sibling = 1;
Expand All @@ -5354,13 +5358,14 @@ sub print_person
$residencestring .= i18n(' mother, ') . given_names($mother);
} elsif($with_father) {
$residencestring .= i18n(' father, ') . given_names($father);
}
if($first) {
$residencestring .= ')';
$first = 0;
} else {
$residencestring .= ' ';
$Data::Dumper::Maxdepth = 2;
print STDERR __LINE__, ': ', Data::Dumper->new([\%living_with])->Dump();
die "BUG: living_with set, but can't determine with whom";
}

$residencestring .= $first ? ')' : ' ';
$first = 0;
}
} elsif(($same_road_as_mother || $same_road_as_father) && !$printed_sibling) {
if($age >= 30) {
Expand Down

0 comments on commit f1d6d87

Please sign in to comment.