From 49be2ed2e13a61ba0ab2ae7cca44dcdc1829f3eb Mon Sep 17 00:00:00 2001 From: Wynn Wolf Arbor Date: Wed, 18 Mar 2020 19:47:54 +0100 Subject: Fix string truncation in menu_draw The previous size calculation did not account for the prompt characters (0xc2 0xbb and 0xc2 0xab respectively). --- menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/menu.c b/menu.c index 6648286..9bc904b 100644 --- a/menu.c +++ b/menu.c @@ -53,7 +53,7 @@ struct menu_ctx { XftDraw *xftdraw; struct geom geom; char searchstr[MENU_MAXENTRY + 1]; - char dispstr[MENU_MAXENTRY*2 + 1]; + char dispstr[MENU_MAXENTRY*2 + 5]; char promptstr[MENU_MAXENTRY + 1]; int list; int listing; -- cgit v1.2.3-2-gb3c3