Commit 7da205f4 authored by topjohnwu's avatar topjohnwu

Round sizes to nearest integer

parent 754fafcf
......@@ -86,8 +86,8 @@ int get_img_size(const char *img, int *used, int *total) {
}
if (status) continue;
sscanf(tok, "%d/%d", used, total);
*used = *used / 256 + 1;
*total /= 256;
*used = (*used + 255) / 256;
*total = (*total + 128) / 256;
break;
}
}
......
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