From 39e1b5b817eafbec5e6e3d03113fb520e056a362 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 27 Mar 2022 14:37:40 -0300 Subject: [PATCH] Virtual ISO: Look for El Torito boot file only in the root directory --- src/cdrom/cdrom_image_viso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cdrom/cdrom_image_viso.c b/src/cdrom/cdrom_image_viso.c index 72ccd89c5..367f420e9 100644 --- a/src/cdrom/cdrom_image_viso.c +++ b/src/cdrom/cdrom_image_viso.c @@ -661,7 +661,7 @@ viso_init(const char *dirname, int *error) } /* Detect El Torito boot code file and set it accordingly. */ - if (!strnicmp(readdir_entry->d_name, "eltorito.", 9) && (!stricmp(readdir_entry->d_name + 9, "com") || !stricmp(readdir_entry->d_name + 9, "img"))) + if ((dir == &viso->root_dir) && !strnicmp(readdir_entry->d_name, "eltorito.", 9) && (!stricmp(readdir_entry->d_name + 9, "com") || !stricmp(readdir_entry->d_name + 9, "img"))) viso->eltorito_entry = last_entry; /* Set short filename. */ @@ -886,7 +886,7 @@ next_dir: *p++ = 0x00; VISO_SKIP(p, 24); strncpy((char *) (p - 24), EMU_NAME, 24); /* ID string */ - *p++ = 0x00; /* checksum */ + *p++ = 0x00; /* checksum */ *p++ = 0x00; *p++ = 0x55; /* key bytes */ *p++ = 0xaa;