From f7b534784ff11068b9d023cfd0df321117e6586c Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Mon, 17 Sep 2012 19:14:22 -0400 Subject: [PATCH] use numeric_limits in draw_marker --- termite.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termite.cc b/termite.cc index 0a488cf..0fabf13 100644 --- a/termite.cc +++ b/termite.cc @@ -142,7 +142,7 @@ static void launch_url(unsigned id) { } static void draw_marker(cairo_t *cr, const char *font, long x, long y, int padding, unsigned id) { - char buffer[3]; + char buffer[std::numeric_limits::digits10 + 1]; cairo_text_extents_t ext; cairo_select_font_face(cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);