fix scp and write in ns1

This commit is contained in:
Olivier Gagnon 2021-11-13 19:33:37 -05:00
parent 3cbf2e8e7d
commit badba2eb1b

@ -167,14 +167,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
const entry = ns[name];
if (typeof entry === "function") {
//Async functions need to be wrapped. See JS-Interpreter documentation
if (
name === "hack" ||
name === "grow" ||
name === "weaken" ||
name === "sleep" ||
name === "prompt" ||
name === "manualHack"
) {
if (["hack", "grow", "weaken", "sleep", "prompt", "manualHack", "scp", "write"].includes(name)) {
const tempWrapper = function (...args: any[]): void {
const fnArgs = [];