aboutsummaryrefslogtreecommitdiff
path: root/pango.c
diff options
context:
space:
mode:
authorNikita Ivanov <nikita.vyach.ivanov@gmail.com>2023-06-04 22:51:26 +0200
committeradnano <me@adnano.co>2023-06-05 09:33:20 -0400
commit9fb3ffa5221e91f61ad5476c5cf226ab8789ed3e (patch)
tree3826cc67805aa773e0d394e72c3b21996b9d642c /pango.c
parentbbd82569bb5dd72fa98b8229f1ca137551ec1bdb (diff)
downloadwmenu-9fb3ffa5221e91f61ad5476c5cf226ab8789ed3e.tar.gz
Fix crash when some line contains %
Diffstat (limited to 'pango.c')
-rw-r--r--pango.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pango.c b/pango.c
index ac5ff4e..22c1487 100644
--- a/pango.c
+++ b/pango.c
@@ -66,7 +66,7 @@ void get_text_size(cairo_t *cairo, const char *font, int *width, int *height,
int text_width(cairo_t *cairo, const char *font, const char *text) {
int text_width;
- get_text_size(cairo, font, &text_width, NULL, NULL, 1, text);
+ get_text_size(cairo, font, &text_width, NULL, NULL, 1, "%s", text);
return text_width;
}