summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
Diffstat (limited to 'stream')
-rw-r--r--stream/stream_dvdnav.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index c1513e9e85..cfbf438cf0 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -501,7 +501,7 @@ static int control(stream_t *stream, int cmd, void *arg)
int n = dvdnav_describe_title_chapters(dvdnav, tit, &parts, &duration);
if (!parts)
break;
- if (chapter < 0 || chapter + 1 >= n)
+ if (chapter < 0 || chapter + 1 > n)
break;
*ch = chapter > 0 ? parts[chapter - 1] / 90000.0 : 0;
free(parts);