diff options
author | Ricardo Constantino <wiiaboo@gmail.com> | 2016-10-20 19:02:32 +0100 |
---|---|---|
committer | Ricardo Constantino <wiiaboo@gmail.com> | 2016-10-20 19:07:35 +0100 |
commit | a6da4faac5e3f3f3f521760f78bef91721c22778 (patch) | |
tree | fd2fdc43e426144923271837c7236c41fdc4a54b /player/lua | |
parent | 773d52162e92530d5d0639caa804c56f42f0e8ab (diff) |
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
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/osc.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua index ff7d9120ed..fec1eb07cb 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -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) |