From b9c292f7cf2d9104c5f9f35aae4e14841ee6fefa Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Mon, 17 May 2021 18:04:10 -0400 Subject: [PATCH] Can no longer export negative amount --- src/Constants.ts | 1 + src/Corporation/ui/CorporationUIEventHandler.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Constants.ts b/src/Constants.ts index 5f5a3c47d..3c31a8042 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -246,6 +246,7 @@ export const CONSTANTS: IMap = { Corp * Self-fund with an invalid name no longer takes away 150b anyway. + * Can no longer export negative amount Misc. * ls now correctly lists all files. diff --git a/src/Corporation/ui/CorporationUIEventHandler.js b/src/Corporation/ui/CorporationUIEventHandler.js index 06ad8af6c..ea0d0b8ff 100644 --- a/src/Corporation/ui/CorporationUIEventHandler.js +++ b/src/Corporation/ui/CorporationUIEventHandler.js @@ -320,7 +320,7 @@ export class CorporationEventHandler { return false; } - if (temp == null || isNaN(temp)) { + if (temp == null || isNaN(temp) || temp < 0) { dialogBoxCreate("Invalid amount entered for export"); return; }