--- ./src/dvdbackup.c~ 2009-06-09 07:25:29.000000000 +0900 +++ ./src/dvdbackup.c 2009-07-08 02:27:46.000000000 +0900 @@ -1627,6 +1627,13 @@ vts_title = titles_info->titles[titles - 1].vts_title; + if (start_chapter > titles_info->titles[titles - 1].chapters && + end_chapter > titles_info->titles[titles - 1].chapters) { + fprintf(stderr, _("Overflowed the start_chapter; only %d chapters in %d title\n"), start_chapter,titles); + fprintf(stderr, _("Overflowed the end_chapter; only %d chapters in %d title\n"), end_chapter,titles); + return(1); + } + if (end_chapter > titles_info->titles[titles - 1].chapters) { end_chapter = titles_info->titles[titles - 1].chapters; fprintf(stderr, _("Truncated the end_chapter; only %d chapters in %d title\n"), end_chapter,titles); @@ -1634,7 +1641,7 @@ if (start_chapter > titles_info->titles[titles - 1].chapters) { start_chapter = titles_info->titles[titles - 1].chapters; - fprintf(stderr, _("Truncated the end_chapter; only %d chapters in %d title\n"), end_chapter,titles); + fprintf(stderr, _("Truncated the start_chapter; only %d chapters in %d title\n"), start_chapter,titles); }