summaryrefslogtreecommitdiff
path: root/rust/tests/binary_reader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/tests/binary_reader.rs')
-rw-r--r--rust/tests/binary_reader.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/rust/tests/binary_reader.rs b/rust/tests/binary_reader.rs
index 88017052..592025e0 100644
--- a/rust/tests/binary_reader.rs
+++ b/rust/tests/binary_reader.rs
@@ -1,5 +1,5 @@
use binaryninja::binary_reader::BinaryReader;
-use binaryninja::binary_view::BinaryViewBase;
+use binaryninja::binary_view::{BinaryViewBase, BinaryViewExt};
use binaryninja::headless::Session;
use rstest::*;
use std::io::{Read, Seek, SeekFrom};
@@ -55,6 +55,9 @@ fn test_binary_reader_read(_session: &Session) {
let view = binaryninja::load(out_dir.join("atox.obj")).expect("Failed to create view");
let mut reader = BinaryReader::new(&view);
+ // We want to do seeks with the image base.
+ reader.set_virtual_base(view.original_image_base());
+
reader
.seek(SeekFrom::Start(0))
.expect("Failed to seek to start");