From eb4967eab943e8ba74279864c23d980ac10c753c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 14 Nov 2009 02:55:10 +0100 Subject: [PATCH] mpdclient: allow song id 0 Off-by-one bug. Change ">" to ">=". --- src/mpdclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mpdclient.c b/src/mpdclient.c index ca7a7b6..e53e58c 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -229,7 +229,7 @@ mpdclient_update(struct mpdclient *c) } /* update the current song */ - if (!c->song || mpd_status_get_song_id(c->status)) { + if (!c->song || mpd_status_get_song_id(c->status) >= 0) { c->song = playlist_get_song(&c->playlist, mpd_status_get_song_pos(c->status)); } -- 2.30.2