diff options
author | Karl Williamson <khw@cpan.org> | 2018-03-24 18:52:44 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-03-26 16:26:54 -0600 |
commit | e113b1b3f20b11732d5c656f2271ac3f2a8648da (patch) | |
tree | 3589c4680e4df151a7875587241c870646d17f38 /regen | |
parent | f99e05907785e2662630fe67314f2fc7a902d879 (diff) | |
download | perl-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.pl | 12 |
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 |