diff options
Diffstat (limited to 'apps/plugins/mp3_encoder.c')
-rw-r--r-- | apps/plugins/mp3_encoder.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/plugins/mp3_encoder.c b/apps/plugins/mp3_encoder.c index 6849daf2f3..9da0d6925f 100644 --- a/apps/plugins/mp3_encoder.c +++ b/apps/plugins/mp3_encoder.c | |||
@@ -2399,9 +2399,8 @@ char mp3_name[80]; | |||
2399 | 2399 | ||
2400 | void get_mp3_filename(const char *wav_name) | 2400 | void get_mp3_filename(const char *wav_name) |
2401 | { | 2401 | { |
2402 | int slen = rb->strlen(wav_name); | 2402 | rb->strlcpy(mp3_name, wav_name, sizeof(mp3_name)); |
2403 | rb->strncpy(mp3_name, wav_name, 79); | 2403 | rb->strlcpy(mp3_name + rb->strlen(mp3_name) - 4, ".mp3", 5); |
2404 | rb->strncpy(mp3_name + slen - 4, ".mp3", 5); | ||
2405 | } | 2404 | } |
2406 | 2405 | ||
2407 | #if CONFIG_KEYPAD == IRIVER_H100_PAD || CONFIG_KEYPAD == IRIVER_H300_PAD | 2406 | #if CONFIG_KEYPAD == IRIVER_H100_PAD || CONFIG_KEYPAD == IRIVER_H300_PAD |