summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-03-24 18:52:44 -0600
committerKarl Williamson <khw@cpan.org>2018-03-26 16:26:54 -0600
commite113b1b3f20b11732d5c656f2271ac3f2a8648da (patch)
tree3589c4680e4df151a7875587241c870646d17f38 /regen
parentf99e05907785e2662630fe67314f2fc7a902d879 (diff)
downloadperl-e113b1b3f20b11732d5c656f2271ac3f2a8648da.tar.gz
regen/mk_invlists.pl: Fix bug with adjusted inputs
This doesn't affect any current uses, but we need to better account for adjusted inversion maps.
Diffstat (limited to 'regen')
-rw-r--r--regen/mk_invlists.pl12
1 files changed, 11 insertions, 1 deletions
diff --git a/regen/mk_invlists.pl b/regen/mk_invlists.pl
index e56028eb7e..1263b26070 100644
--- a/regen/mk_invlists.pl
+++ b/regen/mk_invlists.pl
@@ -2140,7 +2140,17 @@ for my $charset (get_supported_code_pages()) {
@{$xlated{$range_start}} = split /\cK/, $bucket;
}
else {
- $xlated{$range_start} = $bucket;
+ # If adjusting, and there is more than one thing
+ # that maps to the same thing, they must be split
+ # so that later the adjusting doesn't think the
+ # subsequent items can go away because of the
+ # adjusting.
+ my $range_end = ($to_adjust && $bucket != $map_default)
+ ? $mapped_lists{$bucket}->[1] - 1
+ : $range_start;
+ for my $i ($range_start .. $range_end) {
+ $xlated{$i} = $bucket;
+ }
}
shift @{$mapped_lists{$bucket}}; # Discard odd ranges
shift @{$mapped_lists{$bucket}}; # Get ready for next