mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 21:21:11 +00:00
Attempt fix.
This commit is contained in:
@@ -139,8 +139,12 @@ macro_rules! impl_stubs {
|
||||
$(
|
||||
#[no_mangle]
|
||||
pub fn $name(input_data: *mut u8, input_len: usize) -> u64 {
|
||||
let input = unsafe {
|
||||
$crate::vec::Vec::from_raw_parts(input_data, input_len, input_len)
|
||||
let input = if input_len == 0 {
|
||||
$crate::vec::Vec::new()
|
||||
} else {
|
||||
unsafe {
|
||||
$crate::vec::Vec::from_raw_parts(input_data, input_len, input_len)
|
||||
}
|
||||
};
|
||||
|
||||
let output = super::$name(&input[..]);
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -54,8 +54,6 @@ fn test_panic(_input: &[u8]) -> Vec<u8> {
|
||||
fn test_conditional_panic(input: &[u8]) -> Vec<u8> {
|
||||
if input.len() > 0 {
|
||||
panic!("test panic");
|
||||
} else {
|
||||
assert!(input.len() > 0);
|
||||
}
|
||||
input.to_vec()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user