node-dbf icon indicating copy to clipboard operation
node-dbf copied to clipboard

Conversion of Buffer to Number was not correct for some numbers

Open szandras2524 opened this issue 6 years ago • 0 comments

Hey,

I found this small issue, while the converter was not correct.

Now, it's working perfectly for me.

Header.prototype.convertBinaryToInteger = function (buffer) { if (buffer.length == 1) return buffer.readUInt8(0); if (buffer.length == 2) return buffer.readUInt16LE(0); if (buffer.length == 4) return buffer.readUInt32LE(0); return 0; };

Thanks for your great code!

András

szandras2524 avatar Jul 28 '19 11:07 szandras2524