From 9fb3ffa5221e91f61ad5476c5cf226ab8789ed3e Mon Sep 17 00:00:00 2001 From: Nikita Ivanov Date: Sun, 4 Jun 2023 22:51:26 +0200 Subject: Fix crash when some line contains % --- pango.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pango.c') 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; } -- cgit v1.2.3