From ae0444f94e25cfc8080eea4bcf9a5eadcc996a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Mon, 4 Nov 2019 19:13:44 +0700 Subject: As soon as an order is created, there will be an item --- client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.c b/client.c index e737380..641db88 100644 --- a/client.c +++ b/client.c @@ -75,7 +75,7 @@ void icclient_order(icclient_ord_order **orderptr, const char *sku icclient_ord_order *order = *orderptr; icclient_ord_item *item = NULL; - if (order && order->nitems) { + if (order) { icclient_ord_item **items = order->items; qsort(items, order->nitems, sizeof(icclient_ord_item *), itemcmp); icclient_ord_item *key_item = malloc(sizeof(icclient_ord_item)); -- cgit v1.2.3