From: Max Kellermann Date: Sat, 14 Nov 2009 01:55:10 +0000 (+0100) Subject: mpdclient: allow song id 0 X-Git-Tag: release-0.16~23 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=eb4967eab943e8ba74279864c23d980ac10c753c;p=ncmpc.git mpdclient: allow song id 0 Off-by-one bug. Change ">" to ">=". --- 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)); }