diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index fffd4e6da..dcbed56df 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -176,7 +176,7 @@ export const ns: InternalAPI = { return 0; // To prevent returning infinity below } - return (hackAmount / server.moneyAvailable) * percentHacked; + return hackAmount / (server.moneyAvailable * percentHacked); }, hackAnalyze: (ctx) => (_hostname) => { const hostname = helpers.string(ctx, "hostname", _hostname);