diff options
author | Antony Kellermann | 2018-06-14 13:48:27 -0400 |
---|---|---|
committer | Antony Kellermann | 2018-06-14 13:48:27 -0400 |
commit | dcd5e2b829b865c28c0fc3b9960a874e02b1cdc2 (patch) | |
tree | 63836310f9e56674e2271c821ab3b68d24ed88e8 /portfolio.c | |
parent | 76489c8693cb1c1a4cea5e3787c9723eaeb58553 (diff) | |
download | aur-dcd5e2b829b865c28c0fc3b9960a874e02b1cdc2.tar.gz |
Fixed segfault on tick check security
Diffstat (limited to 'portfolio.c')
-rw-r--r-- | portfolio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/portfolio.c b/portfolio.c index 856af405f686..364f7601554b 100644 --- a/portfolio.c +++ b/portfolio.c @@ -406,8 +406,9 @@ void portfolio_print_stock(const char* symbol) { Json* jobj = json_tokener_parse(pString->data); size_t i = 0, len = json_object_array_length(jobj); - while (i++ < len && strcmp(json_object_get_string(json_object_object_get( - json_object_array_get_idx(jobj, i), "Symbol")), symbol) != 0); + while (i < len && strcmp( + json_object_get_string(json_object_object_get(json_object_array_get_idx(jobj, i), "Symbol")), symbol) != 0) + i++; Info* info = NULL; if (i != len) |