From 4ec1b7740fa70e4433c9a47ff6cf59cd113fdc18 Mon Sep 17 00:00:00 2001 From: Anser Date: Mon, 17 Aug 2026 12:21:55 +0200 Subject: changed MAX_LOGOS check to prevent out of bounce segfault --- src/ascii.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ascii.c b/src/ascii.c index b47b400..0a2dc67 100644 --- a/src/ascii.c +++ b/src/ascii.c @@ -34,7 +34,7 @@ static const struct ascii_mapping_t ascii_mappings[] = const char* get_ascii_name(const struct ascii_mapping_t *d_map, int art) { - if (art > MAX_LOGOS) { + if (art >= MAX_LOGOS) { fprintf(stderr, "get_ascii_path: index out of bounce\n"); fprintf(stderr, "Get default ascii art.\n"); art = 0; -- cgit v1.2.3