fix bug in expect handling on the cli side

This commit is contained in:
Folkert 2022-07-25 22:37:36 +02:00
parent d3cb0e03d4
commit 6d0e751999
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 64 additions and 22 deletions

View file

@ -81,7 +81,6 @@ struct ExpectMemory {
macro_rules! deref_number {
($name: ident, $t: ty) => {
fn $name(&self, addr: usize) -> $t {
// dbg!(std::any::type_name::<$t>(), self.start, addr);
let ptr = unsafe { self.start.add(addr) } as *const _;
*self.bytes_read.borrow_mut() += std::mem::size_of::<$t>();
unsafe { std::ptr::read_unaligned(ptr) }