From 23c70b013bef27399911f14dae918afc702a3937 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 4 Dec 2011 09:08:03 +0100 Subject: [PATCH] core: fix sizeof of variable (struct content instead of its pointer) in function gui_hotlist_add --- src/gui/gui-hotlist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/gui-hotlist.c b/src/gui/gui-hotlist.c index 2e3d3b977..e3aa4a318 100644 --- a/src/gui/gui-hotlist.c +++ b/src/gui/gui-hotlist.c @@ -345,8 +345,10 @@ gui_hotlist_add (struct t_gui_buffer *buffer, new_hotlist->priority = priority; if (creation_time) + { memcpy (&(new_hotlist->creation_time), - creation_time, sizeof (creation_time)); + creation_time, sizeof (*creation_time)); + } else gettimeofday (&(new_hotlist->creation_time), NULL); new_hotlist->buffer = buffer;