Calculate block count using floating point math and Ceiling() for accuracy
This commit is contained in:
parent
0a3ad275c1
commit
bcf2e31a51
@ -259,7 +259,8 @@ namespace UniversalEditor.ObjectModels.FileSystem
|
||||
long blockSize = (System.Environment.WorkingSet / BLOCK_FRACTION);
|
||||
|
||||
long offset = 0;
|
||||
long blockCount = mvarSource.GetLength() / blockSize;
|
||||
double dbl = ((double)mvarSource.GetLength() / (double)blockSize);
|
||||
long blockCount = (long)Math.Ceiling(dbl);
|
||||
|
||||
if (transformations != null)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user