diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index 5b8b3d6bf..143515678 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -308,10 +308,10 @@ const base: InternalAPI = { }, growthAnalyzeSecurity: (ctx: NetscriptContext) => - (_threads: unknown, _hostname?: unknown, _cores?: unknown): number => { + (_threads: unknown, _hostname?: unknown, _cores: unknown = 1): number => { let threads = helpers.number(ctx, "threads", _threads); if (_hostname) { - const cores = _cores ? helpers.number(ctx, "cores", _cores) : 1; + const cores = helpers.number(ctx, "cores", _cores); const hostname = helpers.string(ctx, "hostname", _hostname); const server = helpers.getServer(ctx, hostname);