aboutsummaryrefslogtreecommitdiff
path: root/lib/libdvd/libdvdnav/src/searching.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libdvd/libdvdnav/src/searching.c')
-rw-r--r--lib/libdvd/libdvdnav/src/searching.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/libdvd/libdvdnav/src/searching.c b/lib/libdvd/libdvdnav/src/searching.c
index 0d3475ed1c..ed66bf4d99 100644
--- a/lib/libdvd/libdvdnav/src/searching.c
+++ b/lib/libdvd/libdvdnav/src/searching.c
@@ -224,14 +224,9 @@ timemapdone:
if(found) {
- length = cell->last_sector - cell->first_sector + 1;
- if (target >= length) {
- target -= length;
- } else {
- /* convert the target sector from Cell-relative to absolute physical sector */
- target += cell->first_sector;
- break;
- }
+ if (target >= cell->first_sector
+ && target <= cell->last_sector)
+ break;
} else {