Skip to content

Commit

Permalink
size now display the correct size. It now takes the record length fro…
Browse files Browse the repository at this point in the history
…m bytes 4-7. this fixes mbostock#41.
  • Loading branch information
francis committed Jan 13, 2021
1 parent 93f6837 commit 6f90f4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbf/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function Dbf(source, decoder, head, body) {
this._source = source;
this._decode = decoder.decode.bind(decoder);
this._recordLength = head.getUint16(10, true);
this.size = head.getUint16(4, true);
this.size = head.getUint32(4, true);
this._fields = [];
for (var n = 0; body.getUint8(n) !== 0x0d; n += 32) {
for (var j = 0; j < 11; ++j) if (body.getUint8(n + j) === 0) break;
Expand Down

0 comments on commit 6f90f4e

Please sign in to comment.