Use tabledivide64() in Gv_GetArrayCountFromFile()

git-svn-id: https://svn.eduke32.com/eduke32@7157 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-11-18 18:06:33 +00:00
parent 1cae4ce7e3
commit 3cfda9858d

View file

@ -581,7 +581,10 @@ size_t __fastcall Gv_GetArrayCountFromFile(int const arrayIdx, size_t const file
size_t const elementSize = Gv_GetArrayElementSize(arrayIdx);
size_t const denominator = min(elementSize, sizeof(uint32_t));
return (filelength + denominator - 1) / denominator;
Bassert(denominator);
return tabledivide64(filelength + denominator - 1, denominator);
}
int __fastcall Gv_GetArrayValue(int const id, int index)