Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
d9ce8d83
Commit
d9ce8d83
authored
Feb 09, 2009
by
Vladimir S Eremin
Committed by
Max Kellermann
Feb 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: fixed "next song" check
Check if the "current+1" position is actually valid.
parent
e2f22229
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
playlist.c
src/playlist.c
+2
-3
No files found.
src/playlist.c
View file @
d9ce8d83
...
...
@@ -338,12 +338,11 @@ int getPlaylistNextSong(const struct playlist *playlist)
{
if
(
playlist
->
current
>=
0
)
{
if
(
queue_length
(
&
playlist
->
queue
)
>
1
)
if
(
playlist
->
current
+
1
<
(
int
)
queue_length
(
&
playlist
->
queue
)
)
return
queue_order_to_position
(
&
playlist
->
queue
,
playlist
->
current
+
1
);
else
if
(
playlist
->
queue
.
repeat
==
1
)
return
queue_order_to_position
(
&
playlist
->
queue
,
playlist
->
current
);
return
queue_order_to_position
(
&
playlist
->
queue
,
0
);
}
return
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment