mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Use tabledivide64() in Gv_GetArrayCountFromFile()
git-svn-id: https://svn.eduke32.com/eduke32@7157 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1cae4ce7e3
commit
3cfda9858d
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue