wd177x_dsk.cpp: Add head count check

Prevents further evaluation of incompatible formats.
This commit is contained in:
Jesse Marroquin 2021-08-29 12:28:21 -05:00 committed by GitHub
parent aaaef906ad
commit c64af53210
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}