Merge pull request #8508 from jessexm/patch-2

wd177x_dsk.cpp: Add head count check
This commit is contained in:
ajrhacker 2021-08-29 15:11:30 -04:00 committed by GitHub
commit 3e54ade4bc
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;
}