dvd-sector-copy.c, dvdrip: Cue prompt to check image from `badblocks' file.
[dvdrip] / dvd-sector-copy.c
index 4d44122..03c2a0c 100644 (file)
@@ -524,7 +524,6 @@ static void recovered(secaddr bad_lo, secaddr bad_hi)
   }
   if (lseek(outfd, (off_t)(bad_hi - bad_lo)*SECTORSZ, SEEK_CUR) < 0)
     bail_syserr(errno, "failed to seek past bad sectors");
-  status = 1;
 }
 
 struct recoverybuf {
@@ -663,6 +662,7 @@ static ssize_t recovery_read(struct recoverybuf *r,
 
   n = r->pos + r->end - pos;
   if (!n && want) n = -1;
+  else if (n > want) n = want;
 
 end:
 #ifdef DEBUG
@@ -933,7 +933,7 @@ static int parse_range(const char *p, unsigned f,
     { rc = -1; goto end; }
 
   if (!(f&PRF_HYPHEN)) while (ISSPACE(*p)) p++;
-  if (*p && ((f&PRF_HYPHEN) || *p != '=')) { rc = -1; goto end; }
+  if (*p && ((f&PRF_HYPHEN) || *p != '#')) { rc = -1; goto end; }
 
   rc = 0;
 end: