From 9ac933fb9e59acf90e73581d008955f466fbf800 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Tue, 12 Feb 2019 07:04:34 -0500 Subject: [PATCH] Fix image source not being copied in lv_imgbtn --- lv_objx/lv_imgbtn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_objx/lv_imgbtn.c b/lv_objx/lv_imgbtn.c index 75e545343..abae278f3 100644 --- a/lv_objx/lv_imgbtn.c +++ b/lv_objx/lv_imgbtn.c @@ -82,7 +82,7 @@ lv_obj_t * lv_imgbtn_create(lv_obj_t * par, const lv_obj_t * copy) /*Copy an existing image button*/ else { #if LV_IMGBTN_TILED == 0 - memset(ext->img_src, 0, sizeof(ext->img_src)); + memcpy(ext->img_src, copy_ext->img_src, sizeof(ext->img_src)); #else lv_imgbtn_ext_t * copy_ext = lv_obj_get_ext_attr(copy);