mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-04 19:57:20 +02:00
* Buffer froms that should be allocs
* Remove unnecessary Buffer fill after alloc * minor cleanup on fnv1a.js
This commit is contained in:
parent
0d7676a871
commit
b45a6a8743
3 changed files with 6 additions and 6 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue