1
0
Fork 0

Fix alignment when saving the branch value

This commit is contained in:
krcroft 2020-04-11 13:47:41 -07:00 committed by Patryk Obara
parent aadf4edbed
commit f9a1935c8e
2 changed files with 5 additions and 4 deletions

View file

@ -1150,8 +1150,9 @@ static Bit8u * gen_create_branch_long(BranchTypes type) {
return (cache.pos-4);
}
static void gen_fill_branch_long(Bit8u * data,Bit8u * from=cache.pos) {
*(Bit32u*)data=(Bit32u)(from-data-4);
static void gen_fill_branch_long(uint8_t *data, uint8_t *from = cache.pos)
{
host_writed(data, from - data - sizeof(uint32_t));
}
static Bit8u * gen_create_jump(Bit8u * to=0) {

View file

@ -983,8 +983,8 @@ static Bit8u * gen_create_branch_long(BranchTypes type) {
return (cache.pos-4);
}
static void gen_fill_branch_long(Bit8u * data,Bit8u * from=cache.pos) {
*(Bit32u*)data=(from-data-4);
static void gen_fill_branch_long(uint8_t *data, uint8_t *from = cache.pos) {
host_writed(data, from - data - sizeof(uint32_t));
}
static Bit8u * gen_create_jump(Bit8u * to=0) {