From badf41b33bf879f8facf99a68374a8451ba4319d Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 26 Dec 2003 20:02:02 +0000 Subject: Backport --- lib/cdutils.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'lib/cdutils.cpp') 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 #include @@ -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); } } -- cgit v1.2.3