summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-11-04 19:13:44 +0700
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-11-04 19:13:44 +0700
commitae0444f94e25cfc8080eea4bcf9a5eadcc996a23 (patch)
tree74c0a381269e24c0f7aa61f25770e549131f21b9
parent8e8696ca1a54e955ff91a72d745bc911cf26cfb2 (diff)
As soon as an order is created, there will be an item
-rw-r--r--client.c2
1 files changed, 1 insertions, 1 deletions
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));