Skip to content

Commit 83fea34

Browse files
committed
Fix unportable isdigit() call --- must cast arg to unsigned char.
1 parent 8a7025f commit 83fea34

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/backend/utils/adt/formatting.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.81 2004/11/01 14:33:10 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.82 2004/11/20 02:09:47 tgl Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2004, PostgreSQL Global Development Group
@@ -3786,14 +3786,14 @@ NUM_numpart_from_char(NUMProc *Np, int id, int plen)
37863786
if (*Np->number == ' ' && Np->read_pre + Np->read_post > 0)
37873787
{
37883788
/*
3789-
* locale sign (NUM_S) is always anchored behind a last number, if:
3789+
* locale sign (NUM_S) is always anchored behind a last number, if:
37903790
* - locale sign expected
37913791
* - last read char was NUM_0/9 or NUM_DEC
37923792
* - and next char is not digit
3793-
*/
3793+
*/
37943794
if (IS_LSIGN(Np->Num) && isread &&
3795-
(Np->inout_p+1) <= Np->inout + plen &&
3796-
isdigit(*(Np->inout_p+1))==0)
3795+
(Np->inout_p+1) <= Np->inout + plen &&
3796+
!isdigit((unsigned char) *(Np->inout_p+1)))
37973797
{
37983798
int x;
37993799
char *tmp = Np->inout_p++;

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