* Buffer froms that should be allocs

* Remove unnecessary Buffer fill after alloc
*  minor cleanup on fnv1a.js
This commit is contained in:
David Stephens 2018-04-28 21:39:04 +01:00
parent 0d7676a871
commit b45a6a8743
3 changed files with 6 additions and 6 deletions

View file

@ -46,7 +46,7 @@ exports.getQuotePrefix = getQuotePrefix;
// See list here: https://github.com/Mithgol/node-fidonet-jam
function stringToNullPaddedBuffer(s, bufLen) {
let buffer = Buffer.alloc(bufLen).fill(0x00);
let buffer = Buffer.alloc(bufLen);
let enc = iconv.encode(s, 'CP437').slice(0, bufLen);
for(let i = 0; i < enc.length; ++i) {
buffer[i] = enc[i];