From: a bellenir Date: Tue, 22 Jul 2014 19:17:35 +0000 (+0000) Subject: ditto X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=ddcd526d29c0c38b366b44fa38aa2422bcb16b6e;p=archive%2Fafm.git ditto --- diff --git a/source/workdir.c b/source/workdir.c index a947a4a..487e132 100644 --- a/source/workdir.c +++ b/source/workdir.c @@ -135,8 +135,8 @@ static void get_files(int windex){ ls = popen(cmd, "r"); i = 1; while ((read = getline(&filename, &len, ls)) != -1){ - filename[read-1]=0; //remove ending newline char* lol = mem_allocate(read*sizeof(char), NULL); + filename[read-1]=0; //remove ending newline strcpy(lol, filename); vec_push_back(Windows[windex].vfiles, lol); i++;