diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-10-02 18:58:01 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2019-10-02 18:58:01 +0800 |
commit | c4d27915da7677964c84992c1e34c31ad3a281eb (patch) | |
tree | 621105f2219757bc5efe38328018e22b21a9e43b | |
parent | 1c6462e9fd157384d614ba9ce9dc24b6202c1197 (diff) |
Ticket history attachment list gets resized
according to the length
-rw-r--r-- | ticket.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |