tools: Only allow the absolute difference in bracket pairs to be less than 128, since we need the sign.

This commit is contained in:
Huw Davies 2014-07-09 15:12:30 +01:00 committed by Alexandre Julliard
parent 9329e996b4
commit 4ac5d66dfe
1 changed files with 1 additions and 1 deletions

View File

@ -1345,7 +1345,7 @@ sub dump_bracket($)
{
my $type = $3;
die "unknown bracket $type" unless defined $bracket_types{$type};
die "characters too distant $1 and $2" if abs(hex($2) - hex($1)) >= 256;
die "characters too distant $1 and $2" if abs(hex($2) - hex($1)) >= 128;
$bracket_table[hex $1] = (hex($2) - hex($1)) % 255;
$bracket_table[hex $1] += $bracket_types{$type} << 8;
next;