##// END OF EJS Templates
imanay -
r238:239
parent child
Show More
@@ -455,8 +455,9
455 455 fseek(fd, 0, SEEK_END);
456 456 size_t sz = ftell(fd);
457 457 fseek(fd, 0, SEEK_SET);
458 buffer = malloc(sz);
458 buffer = malloc(sz + 1);
459 459 fread(buffer,sizeof(char),sz,fd);
460 buffer[sz] = '\0';
460 461 fclose(fd);
461 462 return buffer;
462 463 }
General Comments 0
You need to be logged in to leave comments. Login now