diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2018-05-27 10:41:19 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2018-05-27 10:41:19 -0400 |
commit | f963f80970641246cbba172e197068193ad65189 (patch) | |
tree | 86fb2f1c1318b06ec9e8e515028149e64d4b546f /src/backend/utils/mb/Unicode/convutils.pm | |
parent | 3a7cc727c7c502353dbb730a0db793abec4de44b (diff) | |
download | postgresql-f963f80970641246cbba172e197068193ad65189.tar.gz postgresql-f963f80970641246cbba172e197068193ad65189.zip |
Avoid use of unportable hex constant in convutils.pm
Discussion: https://postgr.es/m/5a6d6de8-cff8-1ffb-946c-ccf381800ea1@2ndQuadrant.com
Diffstat (limited to 'src/backend/utils/mb/Unicode/convutils.pm')
-rw-r--r-- | src/backend/utils/mb/Unicode/convutils.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/mb/Unicode/convutils.pm b/src/backend/utils/mb/Unicode/convutils.pm index 103bd0264e5..b3e2dd02319 100644 --- a/src/backend/utils/mb/Unicode/convutils.pm +++ b/src/backend/utils/mb/Unicode/convutils.pm @@ -260,18 +260,18 @@ sub print_radix_table { my $out = $c->{$in}; - if ($in < 0x100) + if ($in <= 0xff) { $b1map{$in} = $out; } - elsif ($in < 0x10000) + elsif ($in <= 0xffff) { my $b1 = $in >> 8; my $b2 = $in & 0xff; $b2map{$b1}{$b2} = $out; } - elsif ($in < 0x1000000) + elsif ($in <= 0xffffff) { my $b1 = $in >> 16; my $b2 = ($in >> 8) & 0xff; @@ -279,7 +279,7 @@ sub print_radix_table $b3map{$b1}{$b2}{$b3} = $out; } - elsif ($in < 0x100000000) + elsif ($in <= 0xffffffff) { my $b1 = $in >> 24; my $b2 = ($in >> 16) & 0xff; |