mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 14:12:27 +01:00
Fix #2275 accepts NaN donation bug
This commit is contained in:
parent
f9fd7a48f8
commit
3ca36fca95
@ -1179,8 +1179,7 @@ export function NetscriptSingularity(
|
||||
helper.updateDynamicRam("donateToFaction", getRamCost("donateToFaction"));
|
||||
helper.checkSingularityAccess("donateToFaction", 3);
|
||||
const faction = getFaction("donateToFaction", name);
|
||||
|
||||
if (typeof amt !== "number" || amt <= 0) {
|
||||
if (typeof amt !== "number" || amt <= 0 || isNaN(amt)) {
|
||||
workerScript.log("donateToFaction", () => `Invalid donation amount: '${amt}'.`);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user