summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autistdraw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/autistdraw.c b/autistdraw.c
index 72484f7..2899251 100644
--- a/autistdraw.c
+++ b/autistdraw.c
@@ -663,7 +663,7 @@ color_to_ansi (uint8_t color)
"\033[0;1;7;37m",
};
- if (color > sizeof table / sizeof table[0])
+ if (color >= sizeof table / sizeof table[0])
return NULL;
return table[color];
}
@@ -742,7 +742,7 @@ color_to_mirc (uint8_t color)
MIRC_L_BLUE, MIRC_L_PURPLE, MIRC_L_CYAN, MIRC_WHITE
};
- if (color > sizeof table / sizeof table[0])
+ if (color >= sizeof table / sizeof table[0])
return MIRC_NONE;
return table[color];
}