mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-11-20 02:32:28 +00:00
Move an assert to avoid firing on load of Mac app
This commit is contained in:
parent
14108fb97b
commit
28cdb24d18
@ -735,8 +735,7 @@ const char *disk6_eject(int drive) {
|
||||
|
||||
const char *err = NULL;
|
||||
|
||||
if (disk6.disk[drive].fd >= 0) {
|
||||
assert(disk6.disk[drive].fd != 0);
|
||||
if (disk6.disk[drive].fd > 0) {
|
||||
disk6_flush(drive);
|
||||
|
||||
int ret = -1;
|
||||
@ -858,6 +857,7 @@ const char *disk6_insert(int drive, const char * const raw_file_name, int readon
|
||||
err = ERR_CANNOT_OPEN;
|
||||
break;
|
||||
}
|
||||
assert(disk6.disk[drive].fd > 0);
|
||||
|
||||
// mmap image file
|
||||
TEMP_FAILURE_RETRY(disk6.disk[drive].mmap_image = mmap(NULL, disk6.disk[drive].whole_len, (readonly ? PROT_READ : PROT_READ|PROT_WRITE), MAP_SHARED|MAP_FILE, disk6.disk[drive].fd, /*offset:*/0));
|
||||
|
Loading…
Reference in New Issue
Block a user