make_unicode: Avoid duplicate lead bytes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7d954f2335
commit
a9285c5131
1503
libs/port/c_10001.c
1503
libs/port/c_10001.c
File diff suppressed because it is too large
Load Diff
|
@ -629,6 +629,7 @@ sub READ_DEFAULTS($)
|
||||||
sub add_lead_byte($)
|
sub add_lead_byte($)
|
||||||
{
|
{
|
||||||
my $ch = shift;
|
my $ch = shift;
|
||||||
|
return if defined $cp2uni[$ch];
|
||||||
push @lead_bytes, $ch;
|
push @lead_bytes, $ch;
|
||||||
$cp2uni[$ch] = 0;
|
$cp2uni[$ch] = 0;
|
||||||
}
|
}
|
||||||
|
@ -640,10 +641,7 @@ sub add_mapping($$)
|
||||||
my ($cp, $uni) = @_;
|
my ($cp, $uni) = @_;
|
||||||
$cp2uni[$cp] = $uni unless defined($cp2uni[$cp]);
|
$cp2uni[$cp] = $uni unless defined($cp2uni[$cp]);
|
||||||
$uni2cp[$uni] = $cp unless defined($uni2cp[$uni]);
|
$uni2cp[$uni] = $cp unless defined($uni2cp[$uni]);
|
||||||
if ($cp > 0xff && !defined($cp2uni[$cp >> 8]))
|
if ($cp > 0xff) { add_lead_byte( $cp >> 8 ); }
|
||||||
{
|
|
||||||
add_lead_byte( $cp >> 8 );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
|
|
Loading…
Reference in New Issue