summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-02 18:58:01 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-02 18:58:01 +0800
commitc4d27915da7677964c84992c1e34c31ad3a281eb (patch)
tree621105f2219757bc5efe38328018e22b21a9e43b
parent1c6462e9fd157384d614ba9ce9dc24b6202c1197 (diff)
Ticket history attachment list gets resized
according to the length
-rw-r--r--ticket.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ticket.c b/ticket.c
index d900354..34fd7bb 100644
--- a/ticket.c
+++ b/ticket.c
@@ -287,6 +287,15 @@ static size_t history_l_handler(void *contents, size_t size, size_t nmemb
size_t i = 0;
while (strcmp(line, "--")) {
i = ticket_history->attachments->length++;
+ rtclient_ticket_history_attachment_list *ptr
+ = realloc(ticket_history->attachments
+ , sizeof(ticket_history
+ ->attachments)
+ + ticket_history
+ ->attachments->length
+ * sizeof
+ (rtclient_ticket_history_attachment));
+ ticket_history->attachments = ptr;
ticket_history->attachments->attachments[i]
= malloc
(sizeof