From 9f9883f8da5fd599b40c85536794f8da1aa424ce Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 15 Jan 2020 02:16:25 +0100 Subject: [PATCH] Fixed a maintainability issue in the CD-ROM image backend code. --- src/cdrom/cdrom_image_backend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cdrom/cdrom_image_backend.c b/src/cdrom/cdrom_image_backend.c index de6f83f12..c0f57e810 100644 --- a/src/cdrom/cdrom_image_backend.c +++ b/src/cdrom/cdrom_image_backend.c @@ -798,6 +798,8 @@ cdi_load_cue(cd_img_t *cdi, const wchar_t *cuefile) success = cdi_add_track(cdi, &trk, &shift, prestart, &total_pregap, cur_pregap); else success = 1; + if (!success) + break; trk.start = 0; trk.skip = 0;