aboutsummarylogtreecommitdiffstats
path: root/portfolio.c
diff options
context:
space:
mode:
Diffstat (limited to 'portfolio.c')
-rw-r--r--portfolio.c2
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;