@@ -405,7 +405,7 @@ PGTYPESdate_defmt_asc(date * d, char *fmt, char *str)
405
405
reading_digit = 1 ;
406
406
for (i = 0 ; str [i ]; i ++ )
407
407
{
408
- if (!isdigit (str [i ]))
408
+ if (!isdigit (( unsigned char ) str [i ]))
409
409
{
410
410
reading_digit = 0 ;
411
411
break ;
@@ -495,22 +495,22 @@ PGTYPESdate_defmt_asc(date * d, char *fmt, char *str)
495
495
496
496
/* convert the whole string to lower case */
497
497
for (i = 0 ; str_copy [i ]; i ++ )
498
- str_copy [i ] = (char ) tolower (str_copy [i ]);
498
+ str_copy [i ] = (char ) tolower (( unsigned char ) str_copy [i ]);
499
499
}
500
500
501
501
/* look for numerical tokens */
502
502
reading_digit = 0 ;
503
503
token_count = 0 ;
504
504
for (i = 0 ; i < strlen (str_copy ); i ++ )
505
505
{
506
- if (!isdigit (str_copy [i ]) && reading_digit )
506
+ if (!isdigit (( unsigned char ) str_copy [i ]) && reading_digit )
507
507
{
508
508
/* the token is finished */
509
509
token [token_count ][1 ] = i - 1 ;
510
510
reading_digit = 0 ;
511
511
token_count ++ ;
512
512
}
513
- else if (isdigit (str_copy [i ]) && !reading_digit )
513
+ else if (isdigit (( unsigned char ) str_copy [i ]) && !reading_digit )
514
514
{
515
515
/* we have found a token */
516
516
token [token_count ][0 ] = i ;
@@ -565,7 +565,7 @@ PGTYPESdate_defmt_asc(date * d, char *fmt, char *str)
565
565
{
566
566
for (j = 0 ; j < PGTYPES_DATE_MONTH_MAXLENGTH ; j ++ )
567
567
{
568
- month_lower_tmp [j ] = (char ) tolower (list [i ][j ]);
568
+ month_lower_tmp [j ] = (char ) tolower (( unsigned char ) list [i ][j ]);
569
569
if (!month_lower_tmp [j ])
570
570
{
571
571
/* properly terminated */
0 commit comments