Commit 8164e943 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

Correctly write in file: do not use fprintf but fputs...

parent b2748f52
......@@ -127,10 +127,11 @@ FILE* gzuncompress(const char* filepath) {
char buffer[512];
output = fopen(newname, "w+");
while (gzread(file, buffer, 511) > 0) {
fprintf(output, buffer, strlen(buffer));
fputs(buffer, output);
memset(buffer, 0, strlen(buffer));
CU_ASSERT_EQUAL(gzclose(file), Z_OK);
fseek(output, 0, SEEK_SET);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment