summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-04-14 23:42:52 -0400
committer AJR <ajrhacker@users.noreply.github.com>2021-04-14 23:42:52 -0400
commit2f5ebeb8b166bf71e8202c04a077f0c867522852 (patch)
tree6d552578da03110653f68636ccd46b693a85cc1d /src/lib/formats
parent29179a34cc294cb2b44e5d0794c2a0f07ac07933 (diff)
wd177x_dsk.cpp: Fix a bug that caused creation to crash for some subformats
Diffstat (limited to 'src/lib/formats')
-rw-r--r--src/lib/formats/wd177x_dsk.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/formats/wd177x_dsk.cpp b/src/lib/formats/wd177x_dsk.cpp
index b7b4da3a382..3d314e12383 100644
--- a/src/lib/formats/wd177x_dsk.cpp
+++ b/src/lib/formats/wd177x_dsk.cpp
@@ -438,7 +438,7 @@ void wd177x_format::check_compatibility(floppy_image *image, std::vector<int> &c
break;
}
int ns = 0;
- for(int j=0; j<256; j++)
+ for(int j = 0; j < 256 && j < sectors.size(); j++)
if(!sectors[j].empty()) {
int sid;
if(tf.sector_base_id == -1) {