@@ -796,7 +796,7 @@ decode_ANSI_colour(const char *cs)
796
796
WORD result = csbi .wAttributes ;
797
797
while (* cs )
798
798
{
799
- if (isdigit (* cs ))
799
+ if (isdigit (( unsigned char )( * cs ) ))
800
800
{
801
801
int code = atoi (cs );
802
802
if (code == 1 ) result |= 0x08 ;
@@ -810,7 +810,7 @@ while (*cs)
810
810
else if (code >= 90 && code <= 97 ) result = (result & 0xF0 ) | BGR_RGB (code - 90 ) | 0x08 ;
811
811
else if (code >= 100 && code <= 107 ) result = (result & 0x0F ) | (BGR_RGB (code - 100 ) << 4 ) | 0x80 ;
812
812
813
- while (isdigit (* cs )) cs ++ ;
813
+ while (isdigit (( unsigned char )( * cs ) )) cs ++ ;
814
814
}
815
815
if (* cs ) cs ++ ;
816
816
}
@@ -1989,7 +1989,7 @@ switch (*(++string))
1989
1989
case '{' :
1990
1990
brace = TRUE;
1991
1991
string ++ ;
1992
- if (!isdigit (* string )) /* Syntax error: a decimal number required. */
1992
+ if (!isdigit (( unsigned char )( * string ) )) /* Syntax error: a decimal number required. */
1993
1993
{
1994
1994
if (!callout )
1995
1995
fprintf (stderr , "pcre2grep: Error in output text at offset %d: %s\n" ,
@@ -4036,7 +4036,7 @@ for (i = 1; i < argc; i++)
4036
4036
4037
4037
if (op -> type == OP_OP_NUMBER || op -> type == OP_OP_NUMBERS )
4038
4038
{
4039
- if (isdigit ((unsigned char )s [1 ])) break ;
4039
+ if (isdigit ((unsigned char )( s [1 ]) )) break ;
4040
4040
}
4041
4041
else /* Check for an option with data */
4042
4042
{
@@ -4520,7 +4520,7 @@ for (fn = file_lists; fn != NULL; fn = fn->next)
4520
4520
{
4521
4521
int frc ;
4522
4522
char * end = buffer + (int )strlen (buffer );
4523
- while (end > buffer && isspace (end [-1 ])) end -- ;
4523
+ while (end > buffer && isspace (( unsigned char )( end [-1 ]) )) end -- ;
4524
4524
* end = 0 ;
4525
4525
if (* buffer != 0 )
4526
4526
{
0 commit comments