mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-09 13:16:26 +00:00
fix bug for return value when skip_n is passed
This commit is contained in:
parent
811f35bf7d
commit
e488345607
|
@ -4155,7 +4155,7 @@ aot_copy_callstack_tiny_frame(WASMExecEnv *exec_env, wasm_frame_t *buffer,
|
||||||
frame -= 1;
|
frame -= 1;
|
||||||
++count;
|
++count;
|
||||||
}
|
}
|
||||||
return count;
|
return count >= skip_n ? count - skip_n : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32
|
uint32
|
||||||
|
@ -4205,7 +4205,7 @@ aot_copy_callstack_standard_frame(WASMExecEnv *exec_env, wasm_frame_t *buffer,
|
||||||
* now it poses a risk due to variable size of the frame
|
* now it poses a risk due to variable size of the frame
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
return count;
|
return count >= skip_n ? count - skip_n : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32
|
uint32
|
||||||
|
|
|
@ -4240,7 +4240,7 @@ wasm_interp_copy_callstack(WASMExecEnv *exec_env, wasm_frame_t *buffer,
|
||||||
cur_frame = cur_frame->prev_frame;
|
cur_frame = cur_frame->prev_frame;
|
||||||
++count;
|
++count;
|
||||||
}
|
}
|
||||||
return count;
|
return count >= skip_n ? count - skip_n : 0;
|
||||||
}
|
}
|
||||||
#endif // WAMR_ENABLE_COPY_CALLSTACK
|
#endif // WAMR_ENABLE_COPY_CALLSTACK
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user