diff --git a/sffcEncoder.js b/sffcEncoder.js index 9ab8f3e..4e5e20d 100644 --- a/sffcEncoder.js +++ b/sffcEncoder.js @@ -64,7 +64,7 @@ var intToFloatArray = function (number, n) { } var padLeadingZeros = function (hex, byteSize) { - return (hex.length === byteSize * 2) ? hex : padLeadingZeros('0' + hex, byteSize) + return hex.padStart(byteSize * 2, '0') } module.exports = {