abstractvector / node-dbf

An efficient dBase DBF file parser written in pure JavaScript
MIT License
54 stars 67 forks source link

Field Length Problem #32

Open KenOn10 opened 6 years ago

KenOn10 commented 6 years ago

This code is really helpful and performs well.

But, I had problems with DBF columns having lengths >128 characters, which are parsed wrong (i.e. column lengths appear as <0). IMHO, there is a bug in function convertBinaryToInteger() in header.js. The code uses buffer.readIntLE(0, buffer.length) but should use the unsigned version instead: buffer.readUIntLE(0, buffer.length).

Thanks, Ken

mightyjol commented 5 years ago

I comfirm that changing the header.js file to use buffer.readUIntLE(0, buffer.length) fixes the issue

Thanks