diff options
author | Antony Kellermann | 2018-07-15 15:36:16 -0400 |
---|---|---|
committer | Antony Kellermann | 2018-07-15 15:36:16 -0400 |
commit | 3cecf33b7bb9c452926a08e773d718234cc51f85 (patch) | |
tree | bbd21b75f7174a15c346895a096473f01f0cb7cc | |
parent | 58e4561e4934334b2804efc62179599c08c41d66 (diff) | |
download | aur-3cecf33b7bb9c452926a08e773d718234cc51f85.tar.gz |
Made it so porfolio_modify_string arguments cannot be negative
-rw-r--r-- | portfolio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/portfolio.c b/portfolio.c index a31bbe2622d0..ae8b271e829e 100644 --- a/portfolio.c +++ b/portfolio.c @@ -55,7 +55,7 @@ void portfolio_modify_write(const char* symbol, double quantity_shares, double u int portfolio_modify_string(String* pString, const char* symbol, double quantity_shares, double usd_spent, int mod_option) { - if (symbol != NULL && symbol[0] == '\0') + if ((symbol != NULL && symbol[0] == '\0') || quantity_shares < 0 || usd_spent < 0) return 1; int status = 0; |