bios: fix mem_write address increment
This commit is contained in:
parent
add2746a54
commit
8f1d50525d
|
@ -111,13 +111,16 @@ static void mem_write_handler(int nb_params, char **params)
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 1:
|
case 1:
|
||||||
*(uint8_t *)addr++ = value;
|
*(uint8_t *)addr = value;
|
||||||
|
addr += 1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
*(uint16_t *)addr++ = value;
|
*(uint16_t *)addr = value;
|
||||||
|
addr += 2;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
*(uint32_t *)addr++ = value;
|
*(uint32_t *)addr = value;
|
||||||
|
addr += 4;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf("Incorrect size");
|
printf("Incorrect size");
|
||||||
|
|
Loading…
Reference in New Issue