From 21374d6e6df3ccc8f8fd60dc5306fb34f09cd03b Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 3 May 2020 11:48:03 -0600 Subject: [PATCH] Minor --- core/qwk_mail_packet.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/qwk_mail_packet.js b/core/qwk_mail_packet.js index f42271ff..ef2cbef9 100644 --- a/core/qwk_mail_packet.js +++ b/core/qwk_mail_packet.js @@ -913,11 +913,12 @@ class QWKPacketWriter extends EventEmitter { return; } - while (confNumber < 65537 && usedConfNumbers.has(confNumber)) { + while (confNumber < 10001 && usedConfNumbers.has(confNumber)) { ++confNumber; } - if (confNumber === 65536) { // sanity... + // we can go up to 65535 for some things, but NDX files are limited to 9999 + if (confNumber === 10000) { // sanity... this.emit('warning', Errors.General(`To many conferences`)); } else { this.areaTagConfMap[areaTag] = confNumber; @@ -1412,7 +1413,7 @@ class QWKPacketWriter extends EventEmitter { return callback(null); } - const indexStream = fs.createWriteStream(paths.join(this.workDir, '0000.ndx')); + const indexStream = fs.createWriteStream(paths.join(this.workDir, '000.ndx')); this.inboxIndex.forEach(offset => appendIndexData(indexStream, offset)); indexStream.on('close', err => {