mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 07:57:39 +00:00
Round sizes to nearest integer
This commit is contained in:
parent
754fafcfe9
commit
7da205f4c8
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user