Skip to content

Commit 8bb50ad

Browse files
committed
reverse stack trace in order to place last_pc on correct line
1 parent 5ad5619 commit 8bb50ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/lean_vm/src/diagnostics/stack_trace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub(crate) fn pretty_stack_trace(
9797

9898
if !call_stack.is_empty() {
9999
result.push_str("\nCall stack:\n");
100-
for (i, (line, func)) in call_stack.iter().enumerate() {
100+
for (i, (line, func)) in call_stack.iter().rev().enumerate() {
101101
if i + 1 == call_stack.len() {
102102
result.push_str(&format!(" {}. {} (line {}, pc {})\n", i + 1, func, line, last_pc));
103103
} else {

0 commit comments

Comments
 (0)