forked from enlightenment/enlightenment
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:
parent
48e56c7787
commit
f17fdabb27
|
@ -180,7 +180,7 @@ _notification_popup_merge(E_Notification *n)
|
||||||
len += strlen(body_new);
|
len += strlen(body_new);
|
||||||
if (len < 65536) body_final = alloca(len + 5);
|
if (len < 65536) body_final = alloca(len + 5);
|
||||||
else body_final = malloc(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); */
|
/* printf("set body %s\n", body_final); */
|
||||||
|
|
||||||
e_notification_body_set(n, body_final);
|
e_notification_body_set(n, body_final);
|
||||||
|
|
Loading…
Reference in New Issue