summaryrefslogtreecommitdiff
path: root/ticket.c
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-01 23:16:57 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2019-10-01 23:16:57 +0800
commit70e3bfd86acc04ed1a87f63d58bd814bad07ad2d (patch)
tree7583909d88df2710804249232ee48a669d471915 /ticket.c
parentfc1a90dae7267919efbb9843fb75974ea0a9e711 (diff)
Parse creator after multiple lined content
Diffstat (limited to 'ticket.c')
-rw-r--r--ticket.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ticket.c b/ticket.c
index 0288498..990fc9c 100644
--- a/ticket.c
+++ b/ticket.c
@@ -190,8 +190,15 @@ static size_t history_handler(void *contents, size_t size, size_t nmemb
*/
while ((line = strtok_r(NULL, "\n"
, &linesaveptr))) {
- if (!strncmp(line, "Creator", 7))
+ if (!strncmp(line, "Creator", 7)) {
+ ticket_history->creator
+ = malloc(strlen(line)
+ - 8);
+ line += 9;
+ strcpy(ticket_history->creator
+ , line);
break;
+ }
char *ptr = realloc(ticket_history
->content
, strlen