diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index 3a180c052..83a4335ac 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -509,6 +509,8 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS { if (hackAmount < 0 || hackAmount > server.moneyAvailable) { return -1; + } else if (hackAmount === 0) { + return 0; } const percentHacked = calculatePercentMoneyHacked(server, Player);