Deserialize: fix unsigned bitwise math
This commit is contained in:
parent
64466512be
commit
e4f2f02adf
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
exports.intFromCompact = function(c)
|
exports.intFromCompact = function(c)
|
||||||
{
|
{
|
||||||
var bytes = (c >> 24) & 0xff;
|
var bytes = ((c >>> 24) & 0xff) >>> 0;
|
||||||
var v = (c & 0xffffff) << (8 * (bytes - 3));
|
var v = ((c & 0xffffff) << (8 * (bytes - 3))) >>> 0;
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user