@grain/stdlib 0.5.11 → 0.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/sys/file.gr +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
### [0.5.12](https://github.com/grain-lang/grain/compare/stdlib-v0.5.11...stdlib-v0.5.12) (2023-01-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **stdlib:** Remove memory corruption in File.fdReaddir ([#1573](https://github.com/grain-lang/grain/issues/1573)) ([060fc7b](https://github.com/grain-lang/grain/commit/060fc7ba4e5c4d86098eafbee09bbce13bca32c3))
|
|
9
|
+
|
|
3
10
|
### [0.5.11](https://github.com/grain-lang/grain/compare/stdlib-v0.5.10...stdlib-v0.5.11) (2022-12-29)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
package/sys/file.gr
CHANGED
|
@@ -1128,9 +1128,9 @@ export let fdReaddir = (fd: FileDescriptor) => {
|
|
|
1128
1128
|
|
|
1129
1129
|
let filetype = filetypeFromNumber(WasmI32.load8U(ent, 20n))
|
|
1130
1130
|
|
|
1131
|
-
let dirent = { inode, path, filetype }
|
|
1131
|
+
let dirent = WasmI32.fromGrain({ inode, path, filetype })
|
|
1132
1132
|
|
|
1133
|
-
WasmI32.store(arr + i * 4n,
|
|
1133
|
+
WasmI32.store(arr + i * 4n, Memory.incRef(dirent), 8n)
|
|
1134
1134
|
|
|
1135
1135
|
let next = WasmI32.load(bufs, 4n)
|
|
1136
1136
|
Memory.free(bufs)
|