aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-03-18 19:47:54 +0100
committerWolfgang Müller2021-04-27 12:28:35 +0200
commit49be2ed2e13a61ba0ab2ae7cca44dcdc1829f3eb (patch)
tree71e2a4cb1f55dfccd7be19048e2c6582b6d57050
parent08ab650ce0d4d699e7e062d439ab6c8858bad65a (diff)
downloadcwm-49be2ed2e13a61ba0ab2ae7cca44dcdc1829f3eb.tar.gz
Fix string truncation in menu_draw
The previous size calculation did not account for the prompt characters (0xc2 0xbb and 0xc2 0xab respectively).
-rw-r--r--menu.c2
1 files changed, 1 insertions, 1 deletions
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;