Commit 4ac5d66d authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

tools: Only allow the absolute difference in bracket pairs to be less than 128,…

tools: Only allow the absolute difference in bracket pairs to be less than 128, since we need the sign.
parent 9329e996
...@@ -1345,7 +1345,7 @@ sub dump_bracket($) ...@@ -1345,7 +1345,7 @@ sub dump_bracket($)
{ {
my $type = $3; my $type = $3;
die "unknown bracket $type" unless defined $bracket_types{$type}; 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] = (hex($2) - hex($1)) % 255;
$bracket_table[hex $1] += $bracket_types{$type} << 8; $bracket_table[hex $1] += $bracket_types{$type} << 8;
next; next;
......
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