Skip to content

Commit

Permalink
Prevent underflow if address is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
koute committed Jul 12, 2019
1 parent f655d03 commit 4b24f8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli-core/src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ impl Loader {
let mut interner = self.interner.get_mut();

for &address in &addresses {
let address = address - 1;
let address = if address > 0 { address - 1 } else { 0 };
if let Some( range ) = self.frames_by_address.get( &address ).cloned() {
for index in range {
let frame_id = backtrace_storage[ index ];
Expand Down

0 comments on commit 4b24f8f

Please sign in to comment.