aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/playlist.c')
-rw-r--r--src/playlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/playlist.c b/src/playlist.c
index e6dd1cac0..f2cbf161f 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -425,7 +425,7 @@ enum playlist_result playlistInfo(struct client *client, int song, int max)
if (song >= (int)playlist.length)
return PLAYLIST_RESULT_BAD_RANGE;
if (max > 0) {
- end = MIN((unsigned)(max + 1), playlist.length);
+ end = MIN((unsigned)max, playlist.length);
if (end <= begin)
return PLAYLIST_RESULT_BAD_RANGE;
}