Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit83fea34

Browse files
committed
Fix unportable isdigit() call --- must cast arg to unsigned char.
1 parent8a7025f commit83fea34

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((unsignedchar)*(Np->inout_p+1)))
37973797
{
37983798
intx;
37993799
char*tmp=Np->inout_p++;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp