From 665a03c45af31eb7febe6f1497d096442232a63d Mon Sep 17 00:00:00 2001 From: Tyrolyean Date: Sat, 25 Apr 2020 01:57:59 +0200 Subject: [PATCH] Rewinded file to beginning Signed-off-by: Tyrolyean --- src/attach.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/attach.c b/src/attach.c index 13cd661..e014650 100644 --- a/src/attach.c +++ b/src/attach.c @@ -29,6 +29,7 @@ char* attach_files(FILE* buffer){ return NULL; } memset(new_body,0, len + 1); + fseek(buffer, 0, SEEK_SET); if(fread(new_body, 1, len, buffer) <= 0){ perror("Failed to read file buffer"); free(new_body);