From 2cf4e1019c5d4277b26932fe75d32dbfa58e32b9 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 17 Jan 2019 20:20:12 +0200 Subject: [PATCH] Added precision to number type By default 3 --- src/structure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structure.js b/src/structure.js index 4b02783..4cc3986 100644 --- a/src/structure.js +++ b/src/structure.js @@ -52,7 +52,7 @@ module.exports = function structure(data, meta) { view.setInt8(32 + i * 32 + 11, f.type.charCodeAt(0)); // field length view.setInt8(32 + i * 32 + 16, f.size); - if (f.type == 'N') view.setInt8(32 + i * 32 + 17, 3); + if (f.type == 'N') view.setInt8(32 + i * 32 + 17, 'precision' in f ? f.precision : 3); }); offset = fieldDescLength + 32;