diff options
author | 2022-03-30 21:26:25 +0200 | |
---|---|---|
committer | 2022-03-30 21:26:37 +0200 | |
commit | 3728913a4ee0db1c590646cc4f89a9da6a0446f9 (patch) | |
tree | 57cd9fba5ba6ad6b30bc498001ec03ef88878084 /src/lib/formats/apd_dsk.cpp | |
parent | afc735c502c61c1b1560708dc2f309bef20cef50 (diff) |
floppy: revisit the identify returns
Diffstat (limited to 'src/lib/formats/apd_dsk.cpp')
-rw-r--r-- | src/lib/formats/apd_dsk.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/formats/apd_dsk.cpp b/src/lib/formats/apd_dsk.cpp index b93be8e9372..eb65fb3806d 100644 --- a/src/lib/formats/apd_dsk.cpp +++ b/src/lib/formats/apd_dsk.cpp @@ -96,7 +96,7 @@ const char *apd_format::extensions() const int apd_format::identify(util::random_read &io, uint32_t form_factor, const std::vector<uint32_t> &variants) const { uint64_t size; - if (io.length(size)) + if (io.length(size) || !size) return 0; std::vector<uint8_t> img(size); @@ -129,7 +129,7 @@ int apd_format::identify(util::random_read &io, uint32_t form_factor, const std: } if (!memcmp(&img[0], APD_HEADER, sizeof(APD_HEADER))) { - return 100; + return FIFID_SIGN; } return 0; |