X-Git-Url: https://git.distorted.org.uk/~mdw/dvdrip/blobdiff_plain/ed689e74d8332f87815464523ae91914dda42316..604a495002ac9390d760fffefcbe27372337cc38:/dvd-sector-copy.c diff --git a/dvd-sector-copy.c b/dvd-sector-copy.c index 4d44122..03c2a0c 100644 --- a/dvd-sector-copy.c +++ b/dvd-sector-copy.c @@ -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: