1
mirror of https://github.com/mpv-player/mpv synced 2025-01-20 21:07:29 +01:00

sanity check: since chapter is 0-based it can't exceed nr_of_ptts-1

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19448 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2006-08-19 10:45:17 +00:00
parent 79d5a3b3b1
commit 539b760061

View File

@ -489,7 +489,7 @@ static int seek_to_chapter(stream_t *stream, ifo_handle_t *vts_file, tt_srpt_t *
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];