Skip to content

Commit eb754c5

Browse files
committed
Fix type in SGX backtrace print
1 parent e745627 commit eb754c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/print.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ impl BacktraceFrameFmt<'_, '_, '_> {
198198
// address here, which could be later mapped to correct function.
199199
#[cfg(all(feature = "std", target_env = "sgx"))]
200200
{
201-
frame_ip =
202-
usize::wrapping_sub(frame_ip, std::os::fortanix_sgx::mem::image_base() as _) as _;
201+
let image_base = std::os::fortanix_sgx::mem::image_base();
202+
frame_ip = usize::wrapping_sub(frame_ip as usize, image_base as _) as _;
203203
}
204204

205205
// Print the index of the frame as well as the optional instruction

0 commit comments

Comments
 (0)