diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index b3639c90f..d8ccc753c 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -955,7 +955,7 @@ function NetscriptFunctions(workerScript) { if (scriptname === undefined) { throw makeRuntimeRejectMsg(workerScript, "run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)"); } - if (isNaN(threads) || threads < 0) { + if (isNaN(threads) || threads <= 0) { throw makeRuntimeRejectMsg(workerScript, "Invalid argument for thread count passed into run(). Must be numeric and greater than 0"); } var argsForNewScript = [];