{
struct file_size *rest = (struct file_size *)malloc(length * sizeof(struct file_size));
int restcount = 0;
- unsigned long long int filesize;
FILE *out;
out = fopen(output, "w");
for(int i = 0; i <= length; i++) {
// filesize inklusive overhead
- filesize = 33 + strlen(input[i].name) + input[i].fsize;
-
- if(splitgroesse >= filesize) {
+ if(splitgroesse >= input[i].fsize) {
if(i < length) {
- splitgroesse -= filesize;
+ splitgroesse -= input[i].fsize;
fprintf(out, "%s\n", input[i].name);
} else {
fprintf(out, "%s", input[i].name);