]> gitweb.hhaalo.de Git - discspan.git/commitdiff
fix: ceil with float
authorBastian Dehn <hhaalo@arcor.de>
Sat, 23 Dec 2017 23:06:16 +0000 (00:06 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 23 Dec 2017 23:06:16 +0000 (00:06 +0100)
discspan.c

index a304d28555f11009b24e8cd518894c86c8e537bd..2e8ef79a88fc39107024f0d9b414654cb47f8d5b 100644 (file)
@@ -131,7 +131,7 @@ int splitter(struct file_size *input, const char *output,
        for(int i = 0; i <= length; i++) {
                // ISO9660 filesystem overhead
                filesize = 33 + strlen(input[i].name) + input[i].fsize;
-               filesize = ceil(filesize/2048) * 2048;
+               filesize = ceil(filesize / 2048.0) * 2048;
                // filesize inklusive overhead
                if(splitgroesse >= filesize) {
                        splitgroesse -= filesize;