1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-02-04 07:13:00 +08:00

fix(freetype): fix build break when disable LV_USE_FS_MEMFS (#5651)

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
This commit is contained in:
_VIFEXTech 2024-02-16 06:21:51 +08:00 committed by GitHub
parent baf7fedc82
commit 09ff66b3a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -360,15 +360,21 @@ static FTC_FaceID lv_freetype_req_face_id(lv_freetype_context_t * ctx, const cha
node = _lv_ll_ins_tail(ll_p); node = _lv_ll_ins_tail(ll_p);
LV_ASSERT_MALLOC(node); LV_ASSERT_MALLOC(node);
if(LV_FS_MEMFS_LETTER == pathname[0]) { #if LV_USE_FS_MEMFS
len = sizeof(lv_fs_path_ex_t); if(pathname[0] == LV_FS_MEMFS_LETTER) {
} #if !LV_FREETYPE_USE_LVGL_PORT
else { LV_LOG_WARN("LV_FREETYPE_USE_LVGL_PORT is not enabled");
len++; #endif
} node->pathname = lv_malloc(sizeof(lv_fs_path_ex_t));
node->pathname = lv_malloc(len);
LV_ASSERT_MALLOC(node->pathname); LV_ASSERT_MALLOC(node->pathname);
memcpy(node->pathname, pathname, len); lv_memcpy(node->pathname, pathname, sizeof(lv_fs_path_ex_t));
}
else
#endif
{
node->pathname = lv_strdup(pathname);
LV_ASSERT_NULL(node->pathname);
}
LV_LOG_INFO("add face_id: %s", node->pathname); LV_LOG_INFO("add face_id: %s", node->pathname);