This commit is contained in:
Bryan Ashby 2020-05-03 11:48:03 -06:00
parent 65a5eabe9c
commit 21374d6e6d
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
1 changed files with 4 additions and 3 deletions

View File

@ -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 => {