SCP: Fix error returned by detach_unit to SCPE_NOTATT when an attachable unit isn't currently attached

This commit is contained in:
Mark Pizzolato 2015-04-04 16:49:18 -07:00
parent 7c58a5038d
commit 8ad7dc2b93

2
scp.c
View file

@ -5258,7 +5258,7 @@ if (!(uptr->flags & UNIT_ATT)) { /* not attached? */
if (sim_switches & SIM_SW_REST) /* restoring? */
return SCPE_OK; /* allow detach */
else
return SCPE_NOATT; /* complain */
return SCPE_NOTATT; /* complain */
}
if ((dptr = find_dev_from_unit (uptr)) == NULL)
return SCPE_OK;