From 77f564195c3a9906fb4a6ae7e29ba4bc62064a87 Mon Sep 17 00:00:00 2001 From: Nigel Barnes Date: Fri, 17 Nov 2023 17:42:40 +0000 Subject: jvc_dsk: Only match by file size if the file is headerless. --- src/lib/formats/jvc_dsk.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/formats/jvc_dsk.cpp b/src/lib/formats/jvc_dsk.cpp index 8d6381fb5ad..a65be9e0942 100644 --- a/src/lib/formats/jvc_dsk.cpp +++ b/src/lib/formats/jvc_dsk.cpp @@ -178,7 +178,10 @@ bool jvc_format::parse_header(util::random_read &io, int &header_size, int &trac int jvc_format::identify(util::random_read &io, uint32_t form_factor, const std::vector &variants) const { int header_size, tracks, heads, sectors, sector_size, sector_base_id; - return parse_header(io, header_size, tracks, heads, sectors, sector_size, sector_base_id) ? FIFID_STRUCT|FIFID_SIZE : 0; + if (parse_header(io, header_size, tracks, heads, sectors, sector_size, sector_base_id)) + return header_size ? FIFID_STRUCT | FIFID_SIZE : FIFID_SIZE; + else + return 0; } bool jvc_format::load(util::random_read &io, uint32_t form_factor, const std::vector &variants, floppy_image &image) const -- cgit v1.2.3