diff options
author | Tom Smeding <t.j.smeding@uu.nl> | 2024-07-13 22:40:44 +0200 |
---|---|---|
committer | Tom Smeding <t.j.smeding@uu.nl> | 2024-07-13 22:40:44 +0200 |
commit | 02bdce5c68c2e0d704d65e371d56f96c307b0db1 (patch) | |
tree | 3ba79ea049d6c53b1a8cf71417d57fd4727d630f /src | |
parent | d08c2e38ff1c316e4143d09c52caa5304126f72c (diff) |
Fix warning in kat
Diffstat (limited to 'src')
-rw-r--r-- | src/kat.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -23,8 +23,10 @@ int entry_kat(int argc, char **argv) { return 1; } - for (size_t i = 0; i < map->sb.st_size; i++) { - putchar(map->addr[i]); + if (map->sb.st_size >= 0) { + for (size_t i = 0; i < (size_t)map->sb.st_size; i++) { + putchar(map->addr[i]); + } } close_map(map); |