From: Feross Aboukhadijeh Date: Fri, 12 Sep 2014 00:37:08 +0000 (+0100) Subject: fix readFloat bug X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=9757a865c16502e2f5df5206fa04069563dc8678;p=buffer.git fix readFloat bug --- diff --git a/index.js b/index.js index c8877a3..158bf8c 100644 --- a/index.js +++ b/index.js @@ -800,7 +800,7 @@ function checkIEEE754 (buf, value, offset, ext, max, min) { function writeFloat (buf, value, offset, littleEndian, noAssert) { if (!noAssert) - checkIEEE754(this, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) ieee754.write(buf, value, offset, littleEndian, 23, 4) return offset + 4 }