From bc90dd2927b11ac2078bd8e0f91b7b4bed88662b Mon Sep 17 00:00:00 2001 From: frangarcj Date: Mon, 19 Sep 2016 14:17:19 +0200 Subject: [PATCH] (VITA) Another UTF8 Fix --- gfx/drivers_font/vita2d_font.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/drivers_font/vita2d_font.c b/gfx/drivers_font/vita2d_font.c index 766860fbae..c3ee301eef 100644 --- a/gfx/drivers_font/vita2d_font.c +++ b/gfx/drivers_font/vita2d_font.c @@ -98,8 +98,10 @@ static int vita2d_font_get_message_width(void *data, const char *msg, for (i = 0; i < msg_len; i++) { + const char *msg_tmp = &msg[i]; + unsigned code = utf8_walk(&msg_tmp); const struct font_glyph *glyph = - font->font_driver->get_glyph(font->font_data, (uint8_t)msg[i]); + font->font_driver->get_glyph(font->font_data, code); if (!glyph) /* Do something smarter here ... */ glyph = font->font_driver->get_glyph(font->font_data, '?'); if (!glyph)