mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-04 19:57:20 +02:00
Fix Node.js 10 deprecation warnings
This commit is contained in:
parent
476e8f2f0c
commit
f16eb6f3e6
12 changed files with 42 additions and 41 deletions
|
@ -46,7 +46,7 @@ exports.getQuotePrefix = getQuotePrefix;
|
|||
// See list here: https://github.com/Mithgol/node-fidonet-jam
|
||||
|
||||
function stringToNullPaddedBuffer(s, bufLen) {
|
||||
let buffer = new Buffer(bufLen).fill(0x00);
|
||||
let buffer = Buffer.alloc(bufLen).fill(0x00);
|
||||
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