summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-12-28 12:43:53 -0500
committerTingPing <tingping@tingping.se>2014-12-28 12:43:53 -0500
commit330e31c70fdf42731ac8cd74b94aaeaf9a01e7fd (patch)
tree8ddce23864b5e7c1629d3f0a21f87a99c3bbaa4a
parentcbaa04905fc7476d331ff69be4cd3e0ff5606e34 (diff)
Fix overflow
-rw-r--r--src/fe-text/fe-text.c2
1 files changed, 1 insertions, 1 deletions
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;