Fix crash when some line contains %

This commit is contained in:
Nikita Ivanov 2023-06-04 22:51:26 +02:00 committed by adnano
parent bbd82569bb
commit 9fb3ffa522
2 changed files with 7 additions and 7 deletions

View file

@ -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;
}