Use unsigned right shift in Assembler.le()

This commit is contained in:
2026-03-15 14:07:26 +00:00
parent d4c837216a
commit 401e8e1fad

4
asm.js
View File

@@ -1136,10 +1136,10 @@ export class Assembler {
} }
le(value, count) { le(value, count) {
let bytes = [] const bytes = []
while (value != 0) { while (value != 0) {
bytes.push(value & 0xff); bytes.push(value & 0xff);
value >>= 8; value >>>= 8;
} }
if (count != undefined) { if (count != undefined) {
while (bytes.length < count) while (bytes.length < count)