From 05f862be3f22c4f9b5245b1c5ce2adc0149b519a Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 27 May 2010 17:00:40 +0000 Subject: [PATCH] Identified a bug when previewing messages --- src/phone.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/phone.c b/src/phone.c index 738801a..9ca867e 100644 --- a/src/phone.c +++ b/src/phone.c @@ -807,6 +807,7 @@ void phone_messages_set(Phone * phone, unsigned int index, char const * number, number = ""; if(content == NULL) content = ""; + /* FIXME this may cut in the middle of a UTF-8 character */ snprintf(nd, sizeof(nd), "%s\n%.12s%s", number, content, (strlen(content) > 12) ? "..." : ""); gmtime_r(&date, &t);