only set an approriately sized piece of data. so break where appropriate
Again... how did this work? --HG-- extra : convert_revision : 06dcab4ac9f5760c9847d0fa47fea67c4a46544a
This commit is contained in:
parent
00a2e4a120
commit
d4de2ba0b4
1 changed files with 2 additions and 0 deletions
|
@ -302,8 +302,10 @@ IdeController::writeConfig(int offset, int size, const uint8_t *data)
|
|||
switch(size) {
|
||||
case sizeof(uint8_t):
|
||||
config_regs.data[config_offset] = *data;
|
||||
break;
|
||||
case sizeof(uint16_t):
|
||||
*(uint16_t*)&config_regs.data[config_offset] = *(uint16_t*)data;
|
||||
break;
|
||||
case sizeof(uint32_t):
|
||||
*(uint32_t*)&config_regs.data[config_offset] = *(uint32_t*)data;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue