diff options
author | _VIFEXTech <vifextech@foxmail.com> | 2024-01-15 19:20:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-15 12:20:04 +0100 |
commit | e0be0c925392d287a3708eb04d6074a4ba1b9fc9 (patch) | |
tree | b8d09de6d6ca4ef66ad0fda4e192ebae54f135d6 /tests/unity/unity_support.c | |
parent | 751bc99b982df37d2367782470fc160ea69e1add (diff) | |
download | lvgl-e0be0c925392d287a3708eb04d6074a4ba1b9fc9.tar.gz lvgl-e0be0c925392d287a3708eb04d6074a4ba1b9fc9.zip |
chore(tests): replace sprintf -> lv_snprintf (#5319)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
Diffstat (limited to 'tests/unity/unity_support.c')
-rw-r--r-- | tests/unity/unity_support.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unity/unity_support.c b/tests/unity/unity_support.c index a6c6f636a..564b2922c 100644 --- a/tests/unity/unity_support.c +++ b/tests/unity/unity_support.c @@ -129,7 +129,7 @@ static bool screenhot_compare(const char * fn_ref, const char * mode, uint8_t to { char fn_ref_full[256]; - sprintf(fn_ref_full, "%s%s", REF_IMGS_PATH, fn_ref); + lv_snprintf(fn_ref_full, sizeof(fn_ref_full), "%s%s", REF_IMGS_PATH, fn_ref); lv_refr_now(NULL); @@ -191,7 +191,7 @@ static bool screenhot_compare(const char * fn_ref, const char * mode, uint8_t to fn_ref_no_ext[strlen(fn_ref_no_ext) - 4] = '\0'; char fn_err_full[256]; - sprintf(fn_err_full, "%s%s_err.png", REF_IMGS_PATH, fn_ref_no_ext); + lv_snprintf(fn_err_full, sizeof(fn_err_full), "%s%s_err.png", REF_IMGS_PATH, fn_ref_no_ext); write_png_file(screen_buf_xrgb8888, 800, 480, fn_err_full); } |