summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan2018-05-27 14:41:19 +0000
committerAndrew Dunstan2018-05-27 14:41:19 +0000
commitf963f80970641246cbba172e197068193ad65189 (patch)
tree86fb2f1c1318b06ec9e8e515028149e64d4b546f
parent3a7cc727c7c502353dbb730a0db793abec4de44b (diff)
Avoid use of unportable hex constant in convutils.pm
Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/backend/utils/mb/Unicode/convutils.pm8
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 103bd0264e..b3e2dd0231 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;