Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/io.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2477,7 +2477,9 @@ class TBuffer {
this.o += 4;
if (high < 0x80000000)
return (high < 0x200000) ? (high * 0x100000000 + low) : (BigInt(high) * BigInt(0x100000000) + BigInt(low));
return (~high < 0x200000) ? (-1 - ((~high) * 0x100000000 + ~low)) : (BigInt(-1) - (BigInt(~high) * BigInt(0x100000000) + BigInt(~low)));
// ~ returns signed int32, convert back to unsigned
const nhigh = ~high >>> 0, nlow = ~low >>> 0;
return (nhigh < 0x200000) ? (-1 - (nhigh * 0x100000000 + nlow)) : (BigInt(-1) - (BigInt(nhigh) * BigInt(0x100000000) + BigInt(nlow)));
}

/** @summary read float */
Expand Down
Loading