fixed C2 calculation bug (fixes #35)

This commit is contained in:
Xabier de Zuazo 2013-04-07 11:55:20 +02:00
parent 34e06bdd48
commit a9afd32ad3

View File

@ -363,7 +363,7 @@ function mcHexDigest(hash) {
newByte = ~value & 0xff;
if (carry) {
carry = newByte === 0xff;
buffer.writeUInt8(newByte + 1, i);
buffer.writeUInt8((newByte + 1) & 0xff, i);
} else {
buffer.writeUInt8(newByte, i);
}