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 16a9f76 commit 02d80de
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 @@ -66,7 +66,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 02d80de

Please sign in to comment.