mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-11-20 02:32:28 +00:00
Fix a bug in emulation state restoration that caused disk images to be inserted read/write
This commit is contained in:
parent
6e09383504
commit
8c244486e8
@ -1100,8 +1100,8 @@ bool disk6_loadState(StateHelper_s *helper) {
|
||||
if (!helper->load(fd, &state, 1)) {
|
||||
break;
|
||||
}
|
||||
disk6.disk[i].is_protected = state;
|
||||
LOG("LOAD is_protected[%lu] = %02x", i, disk6.disk[i].is_protected);
|
||||
bool is_protected = (bool)state;
|
||||
LOG("LOAD is_protected[%lu] = %02x", i, is_protected);
|
||||
|
||||
uint8_t serialized[4] = { 0 };
|
||||
if (!helper->load(fd, serialized, 4)) {
|
||||
@ -1124,11 +1124,11 @@ bool disk6_loadState(StateHelper_s *helper) {
|
||||
}
|
||||
|
||||
namebuf[namelen] = '\0';
|
||||
if (disk6_insert(i, namebuf, disk6.disk[i].is_protected)) {
|
||||
if (disk6_insert(i, namebuf, is_protected)) {
|
||||
snprintf(namebuf+namelen, gzlen, "%s", EXT_GZ);
|
||||
namebuf[namelen+gzlen] = '\0';
|
||||
LOG("LOAD disk[%lu] : (%u) %s", i, namelen, namebuf);
|
||||
if (disk6_insert(i, namebuf, disk6.disk[i].is_protected)) {
|
||||
if (disk6_insert(i, namebuf, is_protected)) {
|
||||
FREE(namebuf);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user