Identified a bug when previewing messages
This commit is contained in:
parent
9269981986
commit
05f862be3f
@ -807,6 +807,7 @@ void phone_messages_set(Phone * phone, unsigned int index, char const * number,
|
|||||||
number = "";
|
number = "";
|
||||||
if(content == NULL)
|
if(content == NULL)
|
||||||
content = "";
|
content = "";
|
||||||
|
/* FIXME this may cut in the middle of a UTF-8 character */
|
||||||
snprintf(nd, sizeof(nd), "%s\n%.12s%s", number, content,
|
snprintf(nd, sizeof(nd), "%s\n%.12s%s", number, content,
|
||||||
(strlen(content) > 12) ? "..." : "");
|
(strlen(content) > 12) ? "..." : "");
|
||||||
gmtime_r(&date, &t);
|
gmtime_r(&date, &t);
|
||||||
|
Loading…
Reference in New Issue
Block a user