From 8e8696ca1a54e955ff91a72d745bc911cf26cfb2 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:06 +0700 Subject: Same item doesn't add to nitems --- client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.c b/client.c index 4edecae..e737380 100644 --- a/client.c +++ b/client.c @@ -101,6 +101,7 @@ void icclient_order(icclient_ord_order **orderptr, const char *sku + (i + 1) * sizeof(icclient_ord_item)); order = *orderptr; order->items[i] = malloc(sizeof(icclient_ord_item)); + order->nitems++; item = order->items[i]; item->product = product; item->quantity = 1; @@ -108,7 +109,6 @@ void icclient_order(icclient_ord_order **orderptr, const char *sku order->subtotal += item->product->price; order->total_cost += item->product->price; - order->nitems++; request(NULL, NULL, NULL, "%s%s", "order?mv_arg=", sku); } -- cgit v1.2.3