Return an error for generic block device request on unmounted floppy drives. Fixes bug #481.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4112
This commit is contained in:
parent
825999f3b8
commit
cb8bf9f8f6
1 changed files with 4 additions and 0 deletions
|
@ -152,6 +152,10 @@ bool DOS_IOCTL(void) {
|
|||
return true;
|
||||
case 0x0D: /* Generic block device request */
|
||||
{
|
||||
if (drive < 2 && !Drives[drive]) {
|
||||
DOS_SetError(DOSERR_ACCESS_DENIED);
|
||||
return false;
|
||||
}
|
||||
if (Drives[drive]->isRemovable()) {
|
||||
DOS_SetError(DOSERR_FUNCTION_NUMBER_INVALID);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue