1
0
Fork 0

Fix alignment when writing the jump value to memory

This commit is contained in:
krcroft 2020-04-11 13:49:53 -07:00 committed by Patryk Obara
parent 31b27e6409
commit 1ea78a87fa
2 changed files with 4 additions and 4 deletions

View file

@ -1164,8 +1164,8 @@ static uint8_t *gen_create_jump(uint8_t *to = 0)
}
#if 0
static void gen_fill_jump(Bit8u * data,Bit8u * to=cache.pos) {
*(Bit32u*)data=(Bit32u)(to-data-4);
static void gen_fill_jump(uint8_t *data, uint8_t *to = cache.pos) {
host_writed(data, to - data - sizeof(uint32_t));
}
#endif

View file

@ -994,8 +994,8 @@ static Bit8u * gen_create_jump(Bit8u * to=0) {
return (cache.pos-4);
}
static void gen_fill_jump(Bit8u * data,Bit8u * to=cache.pos) {
*(Bit32u*)data=(to-data-4);
static void gen_fill_jump(uint8_t *data, uint8_t *to = cache.pos) {
host_writed(data, to - data - sizeof(uint32_t));
}