Skip to content

Commit f963f80

Browse files
committed
Avoid use of unportable hex constant in convutils.pm
Discussion: https://postgr.es/m/5a6d6de8-cff8-1ffb-946c-ccf381800ea1@2ndQuadrant.com
1 parent 3a7cc72 commit f963f80

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/utils/mb/Unicode/convutils.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,26 +260,26 @@ sub print_radix_table
260260
{
261261
my $out = $c->{$in};
262262

263-
if ($in < 0x100)
263+
if ($in <= 0xff)
264264
{
265265
$b1map{$in} = $out;
266266
}
267-
elsif ($in < 0x10000)
267+
elsif ($in <= 0xffff)
268268
{
269269
my $b1 = $in >> 8;
270270
my $b2 = $in & 0xff;
271271

272272
$b2map{$b1}{$b2} = $out;
273273
}
274-
elsif ($in < 0x1000000)
274+
elsif ($in <= 0xffffff)
275275
{
276276
my $b1 = $in >> 16;
277277
my $b2 = ($in >> 8) & 0xff;
278278
my $b3 = $in & 0xff;
279279

280280
$b3map{$b1}{$b2}{$b3} = $out;
281281
}
282-
elsif ($in < 0x100000000)
282+
elsif ($in <= 0xffffffff)
283283
{
284284
my $b1 = $in >> 24;
285285
my $b2 = ($in >> 16) & 0xff;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy