Skip to content

Commit 784521d

Browse files
author
Willem Wyndham
authored
fix: Fix invalid signed/unsigned comparison in ReadableStream#read (#1742)
1 parent 74a8989 commit 784521d

File tree

7 files changed

+261
-202
lines changed

7 files changed

+261
-202
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
env:
140140
ASC_FEATURES: mutable-globals,threads,reference-types,bigint-integration,gc
141141
run: |
142-
npm run test:compiler rt/flags features/js-bigint-integration features/reference-types features/threads
142+
npm run test:compiler rt/flags features/js-bigint-integration features/reference-types features/threads std-wasi/process std-wasi/crypto
143143
test-runtimes:
144144
name: "Runtimes"
145145
runs-on: ubuntu-latest

std/assembly/process.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ abstract class WritableStream extends Stream {
133133
abstract class ReadableStream extends Stream {
134134
read(buffer: ArrayBuffer, offset: isize = 0): i32 {
135135
var end = <usize>buffer.byteLength;
136-
if (offset < 0 || offset > end) {
136+
if (offset < 0 || <usize>offset > end) {
137137
throw new Error(E_INDEXOUTOFRANGE);
138138
}
139139
store<usize>(iobuf, changetype<usize>(buffer) + offset);

0 commit comments

Comments
 (0)