Skip to content

Commit

Permalink
Merge pull request #95 from Puellaquae/fs-fix
Browse files Browse the repository at this point in the history
fix: freaddir_sync will lost last entry
  • Loading branch information
juntao authored Jan 14, 2023
2 parents 2ac8eaa + 9a5572a commit 9933c67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
- name: Install WasmEdge
run: |
VERSION=0.10.0
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -e all --version=$VERSION --tf-version=$VERSION --tf-deps-version=$VERSION --tf-tools-version=$VERSION --image-version=$VERSION --image-deps-version=$VERSION -p /usr/local
VERSION=0.11.2
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | sudo bash -s -- -e all --version=$VERSION --tf-version=$VERSION --tf-deps-version=$VERSION --tf-tools-version=$VERSION --image-version=$VERSION -p /usr/local
- uses: actions/setup-node@v2
with:
node-version: '14'
Expand Down
2 changes: 1 addition & 1 deletion src/internal_module/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ fn freaddir_sync(ctx: &mut Context, _this_val: JsValue, arg: &[JsValue]) -> JsVa
*(&buf[idx..(idx + s)] as *const [u8] as *const wasi_fs::Dirent)
};
idx += s;
if (idx + dir.d_namlen as usize) >= len.min(4096) {
if (idx + dir.d_namlen as usize) > len.min(4096) {
break;
}
let name =
Expand Down

0 comments on commit 9933c67

Please sign in to comment.