dvd-sector-copy.c (read_sectors): Force `errno' to zero even if WANT = 0.
[dvdrip] / dvd-sector-copy.c
index ee89f2a..abab0b3 100644 (file)
@@ -336,7 +336,8 @@ static ssize_t read_sectors(secaddr pos, void *buf, secaddr want)
     if (best && pos + want > best->start)
       { want = best->start - pos; fakeerr = EIO; sit(bad_block_delay); }
   }
-  done = 0;
+
+  done = 0; errno = 0;
   while (want) {
     if (vob)
       { errno = 0; n = DVDReadBlocks(vob, pos - file->start, want, p); }