aboutsummaryrefslogtreecommitdiff
path: root/tests/unity/unity_support.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unity/unity_support.c')
-rw-r--r--tests/unity/unity_support.c4
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);
}