pull/1/head
ondra05 2023-06-11 15:42:53 +02:00
parent 03bf6633c8
commit 1fb78a2f20
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ impl Memory {
2 => 1024_usize.pow(3),
_ => unreachable!(),
},
offset: addr as usize & ((1 << 12) - 1),
offset: addr as usize & ((1 << (lvl * 9 + 12)) - 1),
})
}
}