mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-21 05:35:45 +01:00
Merge pull request #4166 from Snarling/ns1wrapfix
NETSCRIPT: NS1 wrapper no longer fails to properly wrap some functions
This commit is contained in:
commit
8f4636cbb4
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user