Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 04b5487

Browse files
committed
Fix a portability bug (ye olde not casting a <ctype.h> argument to
unsigned char). Fortunately we still have buildfarm machines that will flag this. Seems to be new in CVS HEAD, so no backpatch.
1 parent 6bc12a4 commit 04b5487

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/backend/utils/adt/cash.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* this version handles 64 bit numbers and so can hold values up to
1414
* $92,233,720,368,547,758.07.
1515
*
16-
* $PostgreSQL: pgsql/src/backend/utils/adt/cash.c,v 1.70 2007/02/27 23:48:07 tgl Exp $
16+
* $PostgreSQL: pgsql/src/backend/utils/adt/cash.c,v 1.71 2007/07/12 23:51:10 tgl Exp $
1717
*/
1818

1919
#include "postgres.h"
@@ -240,8 +240,9 @@ cash_in(PG_FUNCTION_ARGS)
240240
}
241241
}
242242

243-
/* should only be trailing digits followed by whitespace or closing paren */
244-
while (isdigit(*s)) s++;
243+
/* should only be trailing digits followed by whitespace or right paren */
244+
while (isdigit((unsigned char) *s))
245+
s++;
245246
while (isspace((unsigned char) *s) || *s == ')')
246247
s++;
247248

0 commit comments

Comments
 (0)