Update switch to just return at the end instead

This commit is contained in:
Rob Loach 2018-10-12 09:41:25 -04:00 committed by GitHub
parent f4ee044347
commit e834d32b8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,16 +226,17 @@ static value_t read_lvalue(GB_gameboy_t *gb, lvalue_t lvalue)
return VALUE_16(GB_read_memory(gb, lvalue.memory_address.value) | return VALUE_16(GB_read_memory(gb, lvalue.memory_address.value) |
(GB_read_memory(gb, lvalue.memory_address.value + 1) * 0x100)); (GB_read_memory(gb, lvalue.memory_address.value + 1) * 0x100));
case LVALUE_REG16:
return VALUE_16(*lvalue.register_address);
case LVALUE_REG_L: case LVALUE_REG_L:
return VALUE_16(*lvalue.register_address & 0x00FF); return VALUE_16(*lvalue.register_address & 0x00FF);
case LVALUE_REG_H: case LVALUE_REG_H:
return VALUE_16(*lvalue.register_address >> 8); return VALUE_16(*lvalue.register_address >> 8);
case LVALUE_REG16:
default:
return VALUE_16(*lvalue.register_address);
} }
return VALUE_16(*lvalue.register_address);
} }
static void write_lvalue(GB_gameboy_t *gb, lvalue_t lvalue, uint16_t value) static void write_lvalue(GB_gameboy_t *gb, lvalue_t lvalue, uint16_t value)