mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 17:12:36 +00:00
osc: fix crash after reaching a certain position in limited lists
Don't try to display more items than there are in the chapter/playlist. Fixes #3691
This commit is contained in:
parent
773d52162e
commit
a6da4faac5
@ -672,7 +672,7 @@ function limited_list(prop, pos)
|
||||
end
|
||||
end
|
||||
|
||||
for i=min+1, max do
|
||||
for i=min+1, math.min(max, count) do
|
||||
local item = proplist[i]
|
||||
item.current = (i-1 == pos) and true or nil
|
||||
table.insert(temp, item)
|
||||
|
Loading…
Reference in New Issue
Block a user