Fix ns1 Wrapper

This commit is contained in:
Snarling 2022-09-27 00:03:16 -04:00
parent 69eda4340e
commit 21f7b7ad06

@ -118,7 +118,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<void> {
// See JSInterpreter.js:3209 // See JSInterpreter.js:3209
try { try {
const callback = args.pop() as (value: unknown) => void; const callback = args.pop() as (value: unknown) => void;
const result = await entry(...args.map(int.pseudoToNative)); const result = await entry(...args.map((arg) => int.pseudoToNative(arg)));
return callback(int.nativeToPseudo(result)); return callback(int.nativeToPseudo(result));
} catch (e: unknown) { } catch (e: unknown) {
// TODO: Unify error handling, this was stolen from previous async handler // TODO: Unify error handling, this was stolen from previous async handler