Skip to content

Commit a1fd9c8

Browse files
committed
Fix unbelievably broken counting of native frames
1 parent 1975e1a commit a1fd9c8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/native_stack_trace.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,13 @@ impl NativeStack {
9696

9797
// Merge all python frames until we hit one with `is_entry`.
9898
while python_frame_index < frames.len() {
99+
let is_entry = frames[python_frame_index].is_entry;
99100
merged.push(frames[python_frame_index].clone());
100-
101-
if frames[python_frame_index].is_entry {
101+
python_frame_index += 1;
102+
if is_entry {
102103
break;
103104
}
104-
105-
python_frame_index += 1;
106105
}
107-
python_frame_index += 1;
108106
}
109107
}
110108
};

0 commit comments

Comments
 (0)