From 330e31c70fdf42731ac8cd74b94aaeaf9a01e7fd Mon Sep 17 00:00:00 2001 From: TingPing Date: Sun, 28 Dec 2014 12:43:53 -0500 Subject: [PATCH] Fix overflow --- src/fe-text/fe-text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fe-text/fe-text.c b/src/fe-text/fe-text.c index a6749359..848a393b 100644 --- a/src/fe-text/fe-text.c +++ b/src/fe-text/fe-text.c @@ -208,7 +208,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp, else col = 30; mirc = atoi (num); - mirc = colconv[mirc]; + mirc = colconv[mirc % G_N_ELEMENTS(colconv)]; if (mirc > 9) { mirc += 50;