Merge pull request #2472 from TheMas3212/fix-2245

Fix toLowercase in fileExists check for literature and message files
This commit is contained in:
hydroflame 2022-01-08 14:14:24 -05:00 committed by GitHub
commit 6a00501d94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

@ -1575,7 +1575,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
}
}
for (let i = 0; i < server.messages.length; ++i) {
if (filename.toLowerCase() === server.messages[i]) {
if (filename.toLowerCase() === server.messages[i].toLowerCase()) {
return true;
}
}

@ -58,9 +58,6 @@ export class BaseServer {
maxRam = 0;
// Message files AND Literature files on this Server
// For Literature files, this array contains only the filename (string)
// For Messages, it contains the actual Message object
// TODO Separate literature files into its own property
messages: string[] = [];
// Name of company/faction/etc. that this server belongs to.