Skip to content

Commit e3823aa

Browse files
committed
fix #4415: add uint cast to stdio int parser
1 parent d50e88c commit e3823aa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/shared/stdio_protocol.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,10 +445,12 @@ is not a problem with esbuild. You need to fix your environment instead.
445445
`)
446446

447447
export function readUInt32LE(buffer: Uint8Array, offset: number): number {
448-
return buffer[offset++] |
448+
return (
449+
buffer[offset++] |
449450
(buffer[offset++] << 8) |
450451
(buffer[offset++] << 16) |
451452
(buffer[offset++] << 24)
453+
) >>> 0
452454
}
453455

454456
function writeUInt32LE(buffer: Uint8Array, value: number, offset: number): void {

0 commit comments

Comments
 (0)