fix #4180: Long.prototype.toFloat64() overflow (#4182)

This commit is contained in:
litianzhao
2017-02-21 03:20:56 +08:00
committed by Wouter van Oortmerssen
parent 6561c7a31f
commit ebcfbbadf0
2 changed files with 5 additions and 5 deletions

View File

@@ -115,7 +115,7 @@ flatbuffers.Long.create = function(low, high) {
* @returns {number}
*/
flatbuffers.Long.prototype.toFloat64 = function() {
return this.low + this.high * 0x100000000;
return (this.low >>> 0) + this.high * 0x100000000;
};
/**