mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 16:07: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;
|
if (status) continue;
|
||||||
sscanf(tok, "%d/%d", used, total);
|
sscanf(tok, "%d/%d", used, total);
|
||||||
*used = *used / 256 + 1;
|
*used = (*used + 255) / 256;
|
||||||
*total /= 256;
|
*total = (*total + 128) / 256;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user