diff options
Diffstat (limited to 'src/devices/imagedev/floppy.cpp')
-rw-r--r-- | src/devices/imagedev/floppy.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index c69e55b7a19..70362e876fb 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -145,7 +145,7 @@ floppy_connector::~floppy_connector() { } -void floppy_connector::set_formats(const floppy_format_type *_formats) +void floppy_connector::set_formats(const floppy_format_type _formats[]) { formats = _formats; } @@ -252,11 +252,7 @@ void floppy_image_device::set_formats(const floppy_format_type *formats) { extension_list[0] = '\0'; fif_list = nullptr; - // FIXME: this code previously treated formats as an array, but none of the actual formats in src/lib/formats provide an array - they all just supply a single function pointer - // This happens to work by chance if the next poitner-sized piece of BSS data happens to be zero, which it is most of the time. - // However, for some reason on a Linux clang 6 build it sometimes isn't, causing a lovely crash here. - // If this is supposed to be a nullptr-terminated array of function pointers, the code needs to be changed to better enforce it. - for(int cnt=0; /*formats[cnt]*/ !cnt; cnt++) + for(int cnt=0; formats[cnt]; cnt++) { // allocate a new format floppy_image_format_t *fif = formats[cnt](); |