From: James Halliday Date: Thu, 28 Jan 2016 21:56:12 +0000 (-0800) Subject: disable value check on floats to match node behavior X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=d4622d64f3aec3ce8a342f83b33c1ae7ae7ca962;p=buffer.git disable value check on floats to match node behavior --- diff --git a/index.js b/index.js index 0f2ddbf..c50d1b8 100644 --- a/index.js +++ b/index.js @@ -1193,7 +1193,6 @@ Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) } function checkIEEE754 (buf, value, offset, ext, max, min) { - if (value > max || value < min) throw new RangeError('value is out of bounds') if (offset + ext > buf.length) throw new RangeError('index out of range') if (offset < 0) throw new RangeError('index out of range') }