mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 21:52:17 -04:00
fixed C2 calculation bug (fixes #35)
This commit is contained in:
parent
34e06bdd48
commit
a9afd32ad3
2
index.js
2
index.js
@ -363,7 +363,7 @@ function mcHexDigest(hash) {
|
|||||||
newByte = ~value & 0xff;
|
newByte = ~value & 0xff;
|
||||||
if (carry) {
|
if (carry) {
|
||||||
carry = newByte === 0xff;
|
carry = newByte === 0xff;
|
||||||
buffer.writeUInt8(newByte + 1, i);
|
buffer.writeUInt8((newByte + 1) & 0xff, i);
|
||||||
} else {
|
} else {
|
||||||
buffer.writeUInt8(newByte, i);
|
buffer.writeUInt8(newByte, i);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user