summaryrefslogtreecommitdiff
path: root/lib/cdutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cdutils.cpp')
-rw-r--r--lib/cdutils.cpp16
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);
}
}