mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 17:43:48 +01:00
Merge pull request #2102 from mikomyazaki/2023-hack-analyze-threads-no-money
hackAnalyzeThreads will no longer return NaN under some circumstances
This commit is contained in:
commit
ce0fb7a383
@ -509,6 +509,8 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
|||||||
|
|
||||||
if (hackAmount < 0 || hackAmount > server.moneyAvailable) {
|
if (hackAmount < 0 || hackAmount > server.moneyAvailable) {
|
||||||
return -1;
|
return -1;
|
||||||
|
} else if (hackAmount === 0) {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const percentHacked = calculatePercentMoneyHacked(server, Player);
|
const percentHacked = calculatePercentMoneyHacked(server, Player);
|
||||||
|
Loading…
Reference in New Issue
Block a user