commit 9135c3e07547e1e8663c40356c9adf15463eaeb4
parent 6addd1e45691406b36cacfbce5ba58cfd4e52689
Author: bsandro <[email protected]>
Date: Fri, 10 Dec 2021 01:38:35 +0200
Fixed isdigit() usage
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/day09/puzzle.c b/day09/puzzle.c
@@ -44,7 +44,7 @@ void puzzle(const char *filename, long long *result1, long long *result2) {
size_t len = strlen(buf);
assert(len > 0 && (len-1) == MAP_WIDTH);
for (int i = 0; i < MAP_WIDTH; ++i) {
- assert(isdigit(buf[i]));
+ assert(isdigit((int)buf[i]));
map[line_num][i] = buf[i] - '0';
struct tile_t tile = { .wall = buf[i] == '9', .seen = false };
tiles[line_num][i] = tile;
diff --git a/day09/puzzle_test.c b/day09/puzzle_test.c
@@ -44,7 +44,7 @@ void puzzle_test(const char *filename, long long *result1, long long *result2) {
size_t len = strlen(buf);
assert(len > 0 && (len-1) == MAP_WIDTH);
for (int i = 0; i < MAP_WIDTH; ++i) {
- assert(isdigit(buf[i]));
+ assert(isdigit((int)buf[i]));
map[line_num][i] = buf[i] - '0';
struct tile_t tile = { .wall = buf[i] == '9', .seen = false };
tiles[line_num][i] = tile;