shadowing variable
This commit is contained in:
parent
0b266a7fdc
commit
0ad23cc05e
1 changed files with 4 additions and 4 deletions
|
@ -286,11 +286,11 @@ void configure_disk(bus *const b, console *const cnsl)
|
||||||
int slot = ch - 'A';
|
int slot = ch - 'A';
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
int ch = wait_for_key("Select cartridge action: 1. load, 2. unload, 9. exit", cnsl, { '1', '2', '9' });
|
int ch_action = wait_for_key("Select cartridge action: 1. load, 2. unload, 9. exit", cnsl, { '1', '2', '9' });
|
||||||
if (ch == '9')
|
if (ch_action == '9')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (ch == '1') {
|
if (ch_action == '1') {
|
||||||
auto image_file = select_disk_backend(cnsl);
|
auto image_file = select_disk_backend(cnsl);
|
||||||
|
|
||||||
if (image_file.has_value()) {
|
if (image_file.has_value()) {
|
||||||
|
@ -300,7 +300,7 @@ void configure_disk(bus *const b, console *const cnsl)
|
||||||
cnsl->put_string_lf("Cartridge loaded");
|
cnsl->put_string_lf("Cartridge loaded");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ch == '2') {
|
else if (ch_action == '2') {
|
||||||
if (cartridge_slots->at(slot)) {
|
if (cartridge_slots->at(slot)) {
|
||||||
delete cartridge_slots->at(slot);
|
delete cartridge_slots->at(slot);
|
||||||
cartridge_slots->at(slot) = nullptr;
|
cartridge_slots->at(slot) = nullptr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue