summaryrefslogtreecommitdiff
path: root/apps/recorder/keyboard.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-11-14 11:32:34 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2022-11-14 23:56:16 -0500
commitf6c719d7ec71cc7771c46d3daa390924a3871ba3 (patch)
treee6209f23565db01809f75067247e667963092ff6 /apps/recorder/keyboard.c
parentb25a9d8f99b75570d18ea64602de7fe48da612d6 (diff)
downloadrockbox-f6c719d7ec71cc7771c46d3daa390924a3871ba3.tar.gz
rockbox-f6c719d7ec71cc7771c46d3daa390924a3871ba3.zip
replace strlcpy with strmemccpy
replace applicable calls to strlcpy with calls to strmemccpy which null terminates on truncation in theory the strmemccpy calls should be slightly faster since they don't traverse the rest of the source string on truncation but I seriously doubt there is too much of that going on in the code base Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
Diffstat (limited to 'apps/recorder/keyboard.c')
-rw-r--r--apps/recorder/keyboard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c
index 45cccdcf8b..f64061d303 100644
--- a/apps/recorder/keyboard.c
+++ b/apps/recorder/keyboard.c
@@ -1063,7 +1063,7 @@ static void kbd_draw_edit_line(struct keyboard_parameters *pm,
1063 while (*utf8 && i < pm->max_chars_text) 1063 while (*utf8 && i < pm->max_chars_text)
1064 { 1064 {
1065 j = utf8seek(utf8, 1); 1065 j = utf8seek(utf8, 1);
1066 strlcpy(outline, utf8, j+1); 1066 strmemccpy(outline, utf8, j+1);
1067 sc->getstringsize(outline, &w, NULL); 1067 sc->getstringsize(outline, &w, NULL);
1068 sc->putsxy(text_margin + i*pm->text_w + (pm->text_w-w)/2, 1068 sc->putsxy(text_margin + i*pm->text_w + (pm->text_w-w)/2,
1069 y, outline); 1069 y, outline);