diff options
author | Jesse Marroquin <14297328+jessexm@users.noreply.github.com> | 2021-08-29 12:28:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-29 12:28:21 -0500 |
commit | c64af53210510baee118c6fa5e6208aed7b737f4 (patch) | |
tree | e8c8411c8bd0c7942ff18be5c784e6a3e6308617 /src/lib/formats | |
parent | aaaef906adfb8310478e8aa9cda22c57eaa08123 (diff) |
wd177x_dsk.cpp: Add head count check
Prevents further evaluation of incompatible formats.
Diffstat (limited to 'src/lib/formats')
-rw-r--r-- | src/lib/formats/wd177x_dsk.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/formats/wd177x_dsk.cpp b/src/lib/formats/wd177x_dsk.cpp index da900b03db5..75f3396020f 100644 --- a/src/lib/formats/wd177x_dsk.cpp +++ b/src/lib/formats/wd177x_dsk.cpp @@ -441,8 +441,8 @@ void wd177x_format::check_compatibility(floppy_image *image, std::vector<int> &c int max_tracks, max_heads; image->get_maximal_geometry(max_tracks, max_heads); - // Fail if floppy drive can't handle track count - if(f.track_count > max_tracks) { + // Fail if floppy drive can't handle track or head count + if(f.track_count > max_tracks || f.head_count > max_heads) { goto fail; } |