Skip to content

Commit 3f4a2e9

Browse files
committed
fix compilation error
1 parent cf80d77 commit 3f4a2e9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ic-wasi-polyfill/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ic-wasi-polyfill"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
edition = "2021"
55
keywords = ["ic", "wasi", "wasi-polyfill"]
66
description = "The project provides polyfill implementation of *wasi_snapshot_preview1* functions using IC System API."

ic-wasi-polyfill/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,11 @@ pub unsafe extern "C" fn __ic_custom_fd_readdir(
10121012

10131013
#[cfg(feature = "report_wasi_calls")]
10141014
{
1015-
let mn = std::cmp::min(std::cmp::min(bytes_len as usize, unsafe { *res }), 50);
1015+
let mn = std::cmp::min(
1016+
std::cmp::min(bytes_len as usize, unsafe { *res } as usize),
1017+
50,
1018+
);
1019+
10161020
let buf = unsafe { std::slice::from_raw_parts_mut(bytes, mn) };
10171021

10181022
let t = format!("buf={buf:?}... res={}", unsafe { *res });

0 commit comments

Comments
 (0)