bios: fix mem_write address increment

This commit is contained in:
Franck Jullien 2022-01-14 13:11:44 +01:00 committed by Franck Jullien
parent add2746a54
commit 8f1d50525d
1 changed files with 6 additions and 3 deletions

View File

@ -111,13 +111,16 @@ static void mem_write_handler(int nb_params, char **params)
for (i = 0; i < count; i++) {
switch (size) {
case 1:
*(uint8_t *)addr++ = value;
*(uint8_t *)addr = value;
addr += 1;
break;
case 2:
*(uint16_t *)addr++ = value;
*(uint16_t *)addr = value;
addr += 2;
break;
case 4:
*(uint32_t *)addr++ = value;
*(uint32_t *)addr = value;
addr += 4;
break;
default:
printf("Incorrect size");