Skip to content

Commit

Permalink
Fix 64-bit upper half power (note may still lose precision, see sjmul…
Browse files Browse the repository at this point in the history
  • Loading branch information
deathcap committed Mar 28, 2014
1 parent a15c29c commit f1d7f5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nbt.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
/* FIXME: this can overflow, JS has 53 bit precision */
var upper = this.int();
var lower = this.int();
return (upper << 32) + lower;
return (upper * 4294967296) + lower;
};

this[nbt.tagTypes.byteArray] = function() {
Expand Down

0 comments on commit f1d7f5c

Please sign in to comment.