summaryrefslogtreecommitdiff
path: root/pikul.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-24 13:09:19 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-24 13:09:19 +0800
commitb960919d909c75dc9c483846c2acec5315a0b7db (patch)
tree076f538011e6311320cdbaffb7ae0eb4caa800bc /pikul.c
parent218418f3623da5f07cf8428d1d8687b9d5fbc4ae (diff)
Make sure services is filled with NULL
Diffstat (limited to 'pikul.c')
-rw-r--r--pikul.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pikul.c b/pikul.c
index 8ba0cd1..c9d9eda 100644
--- a/pikul.c
+++ b/pikul.c
@@ -201,8 +201,10 @@ char *pikul_html(char *origins[], char *destinations[], double weight,
struct pikul_service **services[PIKUL_END];
bool no_service = true;
for (enum pikul_company company = PIKUL; company < PIKUL_END; company++) {
- if (!shipping_list[company])
+ if (!shipping_list[company]) {
+ services[company] = NULL;
continue;
+ }
services[company] = pikul_services(company,
origins[company], destinations[company], weight);
if (services[company] && services[company][0])