summaryrefslogtreecommitdiffstats
path: root/src/c_mpdview.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c_mpdview.c')
-rw-r--r--src/c_mpdview.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/c_mpdview.c b/src/c_mpdview.c
index a00c5d2..0a356fc 100644
--- a/src/c_mpdview.c
+++ b/src/c_mpdview.c
@@ -71,9 +71,8 @@ main
struct mpd_status* status;
struct mpd_song* song;
enum mpd_state state;
- long read_size;
+ int read_size;
char buff[BUFF_SIZE];
- /* char* uri; */
(void)argc;
(void)argv;
@@ -103,7 +102,7 @@ main
bzero(buff, BUFF_SIZE);
read_size = mpd_run_albumart(conn, mpd_song_get_uri(song), 0, buff, BUFF_SIZE);
if (read_size > -1) {
- write(STDOUT_FILENO, buff, BUFF_SIZE);
+ write(STDOUT_FILENO, buff, read_size);
}
else {
dprintf(STDOUT_FILENO, "Exit\n");