E notification: Fixed issue with notification content.

The len passed to snprintf should include the \0. This caused garbage to
be printed to screen when merging empty bodied notifications.

SVN revision: 65763
This commit is contained in:
Tom Hacohen 2011-12-01 09:14:03 +00:00
parent 48e56c7787
commit f17fdabb27
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ _notification_popup_merge(E_Notification *n)
len += strlen(body_new);
if (len < 65536) body_final = alloca(len + 5);
else body_final = malloc(len + 5);
snprintf(body_final, len, "%s<ps>%s", body_old, body_new);
snprintf(body_final, len + 1, "%s<ps>%s", body_old, body_new);
/* printf("set body %s\n", body_final); */
e_notification_body_set(n, body_final);