From b960919d909c75dc9c483846c2acec5315a0b7db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sat, 24 Jul 2021 13:09:19 +0800 Subject: Make sure services is filled with NULL --- pikul.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]) -- cgit v1.2.3