diff options
author | Joe <bousset.rudy@gmail.com> | 2022-07-14 14:33:37 +0200 |
---|---|---|
committer | Joe <bousset.rudy@gmail.com> | 2022-07-14 14:33:37 +0200 |
commit | 4446d6da7acef007d4e6b7e3c1813a588562dda3 (patch) | |
tree | 313622b1c0d9ea9c6b549dfd35c4f83727be35b8 | |
parent | opts (diff) | |
download | mpdview-4446d6da7acef007d4e6b7e3c1813a588562dda3.tar.gz mpdview-4446d6da7acef007d4e6b7e3c1813a588562dda3.tar.bz2 mpdview-4446d6da7acef007d4e6b7e3c1813a588562dda3.tar.xz mpdview-4446d6da7acef007d4e6b7e3c1813a588562dda3.tar.zst mpdview-4446d6da7acef007d4e6b7e3c1813a588562dda3.zip |
WIP
-rw-r--r-- | src/c_mpdview.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/c_mpdview.c b/src/c_mpdview.c index 7089d36..dd4f394 100644 --- a/src/c_mpdview.c +++ b/src/c_mpdview.c @@ -163,10 +163,12 @@ static void c_get_current_dir(struct mpdview_s* v) { ptr_t ptr; + size_t len; + len = strlen(v->current_dir); strlcpy(v->current_dir, v->music_dir, PATH_MAX); - v->current_dir[strlen(v->current_dir) + 1] = 0x00; - v->current_dir[strlen(v->current_dir)] = '/'; + v->current_dir[len + 1] = 0x00; + v->current_dir[len] = '/'; strlcat(v->current_dir, mpd_song_get_uri(v->song), PATH_MAX); ptr = v->current_dir; ptr += strlen(v->current_dir); |