Commit a9285c51 authored by Alexandre Julliard's avatar Alexandre Julliard

make_unicode: Avoid duplicate lead bytes.

parent 7d954f23
......@@ -629,6 +629,7 @@ sub READ_DEFAULTS($)
sub add_lead_byte($)
{
my $ch = shift;
return if defined $cp2uni[$ch];
push @lead_bytes, $ch;
$cp2uni[$ch] = 0;
}
......@@ -640,10 +641,7 @@ sub add_mapping($$)
my ($cp, $uni) = @_;
$cp2uni[$cp] = $uni unless defined($cp2uni[$cp]);
$uni2cp[$uni] = $cp unless defined($uni2cp[$uni]);
if ($cp > 0xff && !defined($cp2uni[$cp >> 8]))
{
add_lead_byte( $cp >> 8 );
}
if ($cp > 0xff) { add_lead_byte( $cp >> 8 ); }
}
################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment