aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cube.c2
-rw-r--r--fifteen.c2
-rw-r--r--flip.c4
-rw-r--r--netslide.c6
-rw-r--r--pattern.c4
-rw-r--r--samegame.c4
-rw-r--r--sixteen.c2
-rw-r--r--twiddle.c8
-rw-r--r--windows.c2
9 files changed, 17 insertions, 17 deletions
diff --git a/cube.c b/cube.c
index c1462e7..e271ce3 100644
--- a/cube.c
+++ b/cube.c
@@ -285,7 +285,7 @@ static void decode_params(game_params *ret, char const *string)
default: break;
}
ret->d1 = ret->d2 = atoi(string);
- while (*string && isdigit(*string)) string++;
+ while (*string && isdigit((unsigned char)*string)) string++;
if (*string == 'x') {
string++;
ret->d2 = atoi(string);
diff --git a/fifteen.c b/fifteen.c
index c076350..20ceb4b 100644
--- a/fifteen.c
+++ b/fifteen.c
@@ -76,7 +76,7 @@ static game_params *dup_params(game_params *params)
static void decode_params(game_params *ret, char const *string)
{
ret->w = ret->h = atoi(string);
- while (*string && isdigit(*string)) string++;
+ while (*string && isdigit((unsigned char)*string)) string++;
if (*string == 'x') {
string++;
ret->h = atoi(string);
diff --git a/flip.c b/flip.c
index 2ec16ba..6ccd872 100644
--- a/flip.c
+++ b/flip.c
@@ -116,11 +116,11 @@ static game_params *dup_params(game_params *params)
static void decode_params(game_params *ret, char const *string)
{
ret->w = ret->h = atoi(string);
- while (*string && isdigit(*string)) string++;
+ while (*string && isdigit((unsigned char)*string)) string++;
if (*string == 'x') {
string++;
ret->h = atoi(string);
- while (*string && isdigit(*string)) string++;
+ while (*string && isdigit((unsigned char)*string)) string++;
}
if (*string == 'r') {
string++;
diff --git a/netslide.c b/netslide.c
index 1962d92..206535b 100644
--- a/netslide.c
+++ b/netslide.c
@@ -213,16 +213,16 @@ static void decode_params(game_params *ret, char const *string)
ret->movetarget = 0;
ret->width = atoi(p);
- while (*p && isdigit(*p)) p++;
+ while (*p && isdigit((unsigned char)*p)) p++;
if (*p == 'x') {
p++;
ret->height = atoi(p);
- while (*p && isdigit(*p)) p++;
+ while (*p && isdigit((unsigned char)*p)) p++;
if ( (ret->wrapping = (*p == 'w')) != 0 )
p++;
if (*p == 'b') {
ret->barrier_probability = atof(++p);
- while (*p && (isdigit(*p) || *p == '.')) p++;
+ while (*p && (isdigit((unsigned char)*p) || *p == '.')) p++;
}
if (*p == 'm') {
ret->movetarget = atoi(++p);
diff --git a/pattern.c b/pattern.c
index 3f2d65e..3d5c11f 100644
--- a/pattern.c
+++ b/pattern.c
@@ -106,11 +106,11 @@ static void decode_params(game_params *ret, char const *string)
char const *p = string;
ret->w = atoi(p);
- while (*p && isdigit(*p)) p++;
+ while (*p && isdigit((unsigned char)*p)) p++;
if (*p == 'x') {
p++;
ret->h = atoi(p);
- while (*p && isdigit(*p)) p++;
+ while (*p && isdigit((unsigned char)*p)) p++;
} else {
ret->h = ret->w;
}
diff --git a/samegame.c b/samegame.c
index 810a8eb..4bb535d 100644
--- a/samegame.c
+++ b/samegame.c
@@ -291,9 +291,9 @@ static char *validate_desc(game_params *params, char *desc)
char *q = p;
int n;
- if (!isdigit(*p))
+ if (!isdigit((unsigned char)*p))
return "Not enough numbers in string";
- while (isdigit(*p)) p++;
+ while (isdigit((unsigned char)*p)) p++;
if (i < area-1 && *p != ',')
return "Expected comma after number";
diff --git a/sixteen.c b/sixteen.c
index 0e4f8a8..457e9c9 100644
--- a/sixteen.c
+++ b/sixteen.c
@@ -100,7 +100,7 @@ static void decode_params(game_params *ret, char const *string)
{
ret->w = ret->h = atoi(string);
ret->movetarget = 0;
- while (*string && isdigit(*string)) string++;
+ while (*string && isdigit((unsigned char)*string)) string++;
if (*string == 'x') {
string++;
ret->h = atoi(string);
diff --git a/twiddle.c b/twiddle.c
index 2f33fb7..1000ef4 100644
--- a/twiddle.c
+++ b/twiddle.c
@@ -108,16 +108,16 @@ static void decode_params(game_params *ret, char const *string)
ret->n = 2;
ret->rowsonly = ret->orientable = FALSE;
ret->movetarget = 0;
- while (*string && isdigit(*string)) string++;
+ while (*string && isdigit((unsigned char)*string)) string++;
if (*string == 'x') {
string++;
ret->h = atoi(string);
- while (*string && isdigit(*string)) string++;
+ while (*string && isdigit((unsigned char)*string)) string++;
}
if (*string == 'n') {
string++;
ret->n = atoi(string);
- while (*string && isdigit(*string)) string++;
+ while (*string && isdigit((unsigned char)*string)) string++;
}
while (*string) {
if (*string == 'r') {
@@ -127,7 +127,7 @@ static void decode_params(game_params *ret, char const *string)
} else if (*string == 'm') {
string++;
ret->movetarget = atoi(string);
- while (string[1] && isdigit(string[1])) string++;
+ while (string[1] && isdigit((unsigned char)string[1])) string++;
}
string++;
}
diff --git a/windows.c b/windows.c
index 57673e1..08513d8 100644
--- a/windows.c
+++ b/windows.c
@@ -1690,7 +1690,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
RegisterClass(&wndclass);
}
- while (*cmdline && isspace(*cmdline))
+ while (*cmdline && isspace((unsigned char)*cmdline))
cmdline++;
if (!new_window(inst, *cmdline ? cmdline : NULL, &error)) {