diff options
author | pixel <pixel> | 2003-12-26 20:02:02 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-12-26 20:02:02 +0000 |
commit | badf41b33bf879f8facf99a68374a8451ba4319d (patch) | |
tree | 2e58f0d14d0d58b10b5befdf7cd97c873f57e24a /lib | |
parent | 47b21c600265c30f679861f8c460784530f52354 (diff) |
Backport
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cdutils.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/cdutils.cpp b/lib/cdutils.cpp index 4e25aed..214964a 100644 --- a/lib/cdutils.cpp +++ b/lib/cdutils.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: cdutils.cpp,v 1.21 2003-12-26 19:05:31 pixel Exp $ */ +/* $Id: cdutils.cpp,v 1.22 2003-12-26 20:03:32 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -235,12 +235,22 @@ void cdutils::read_file(Handle * file, long size, int type, int number) { sector_seek(number); for (i = 0; i < n; i++) { - read_sector(sector, type); + try { + read_sector(sector, type); + } + catch(...) { + memset(sector, 0, 2352); + } file->write(sector, sec_sizes[type]); } if (reste) { - read_sector(sector, type); + try { + read_sector(sector, type); + } + catch(...) { + memset(sector, 0, 2352); + } file->write(sector, reste); } } |