Merge fix for "Crash when floppy image file is missing #229"
This commit is contained in:
parent
d9d07c03ec
commit
35abc682cb
@ -2480,7 +2480,11 @@ bool bx_floppy_ctrl_c::evaluate_media(Bit8u devtype, Bit8u type, const char *pat
|
||||
else
|
||||
#endif
|
||||
{ // unix
|
||||
ret = fstat(media->fd, &stat_buf);
|
||||
if (media->fd >= 0) {
|
||||
ret = fstat(media->fd, &stat_buf);
|
||||
} else {
|
||||
ret = EBADF;
|
||||
}
|
||||
}
|
||||
if (ret) {
|
||||
BX_PANIC(("fstat floppy 0 drive image file returns error: %s", strerror(errno)));
|
||||
|
Loading…
Reference in New Issue
Block a user