diff options
author | rcombs <rcombs@rcombs.me> | 2021-05-05 01:48:44 -0500 |
---|---|---|
committer | Oneric <oneric@oneric.stub> | 2021-05-30 23:55:43 +0200 |
commit | 2b00b4e7c63b498449d2acf3ce490fd7c8c65a28 (patch) | |
tree | f48b7aae5f6b241cd4ae0e95d32a00e6d21d03b3 /libass/ass_font.c | |
parent | 96a920a76b9d16572329547c29f728b4436f741c (diff) | |
download | libass-2b00b4e7c63b498449d2acf3ce490fd7c8c65a28.tar.bz2 libass-2b00b4e7c63b498449d2acf3ce490fd7c8c65a28.tar.xz |
Fix some format string bugs
- ass_drawing was logging size_t as %d
- ass_font was logging ASS_StringView as %s (could crash!)
Diffstat (limited to 'libass/ass_font.c')
-rw-r--r-- | libass/ass_font.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libass/ass_font.c b/libass/ass_font.c index 7d79d2e..7c1e76d 100644 --- a/libass/ass_font.c +++ b/libass/ass_font.c @@ -474,7 +474,7 @@ int ass_font_get_index(ASS_FontSelector *fontsel, ASS_Font *font, int face_idx; ass_msg(font->library, MSGL_INFO, "Glyph 0x%X not found, selecting one more " - "font for (%s, %d, %d)", symbol, font->desc.family, + "font for (%.*s, %d, %d)", symbol, (int) font->desc.family.len, font->desc.family.str, font->desc.bold, font->desc.italic); face_idx = *face_index = add_face(fontsel, font, symbol); if (face_idx >= 0) { @@ -491,8 +491,8 @@ int ass_font_get_index(ASS_FontSelector *fontsel, ASS_Font *font, } if (index == 0) { ass_msg(font->library, MSGL_ERR, - "Glyph 0x%X not found in font for (%s, %d, %d)", - symbol, font->desc.family, font->desc.bold, + "Glyph 0x%X not found in font for (%.*s, %d, %d)", + symbol, (int) font->desc.family.len, font->desc.family.str, font->desc.bold, font->desc.italic); } } |