summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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