changeset 19442:ab91d0304070

sanity check: since chapter is 0-based it can't exceed nr_of_ptts-1
author nicodvb
date Sat, 19 Aug 2006 10:45:17 +0000
parents b71fd63c06cb
children 6e618d1fbb23
files stream/stream_dvd.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_dvd.c	Fri Aug 18 19:08:10 2006 +0000
+++ b/stream/stream_dvd.c	Sat Aug 19 10:45:17 2006 +0000
@@ -489,7 +489,7 @@
     if(!vts_file || !tt_srpt)
        return 0;
 
-    if(chapter < 0 || chapter > vts_file->vts_ptt_srpt->title[title_no].nr_of_ptts) //no such chapter
+    if(chapter < 0 || chapter > vts_file->vts_ptt_srpt->title[title_no].nr_of_ptts-1) //no such chapter
        return 0;
 
     ptt = vts_file->vts_ptt_srpt->title[title_no].ptt[chapter];