diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index b81aacb58..57b87493d 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -5545,7 +5545,7 @@ badindex: dispatch(); size_t const filelength = kfilelength(kFile); - size_t const numElements = Gv_GetArrayCountFromFile(arrayNum, filelength); + size_t const numElements = Gv_GetArrayCountForAllocSize(arrayNum, filelength); if (numElements > 0) { diff --git a/source/duke3d/src/gamevars.cpp b/source/duke3d/src/gamevars.cpp index d34a55460..8f01d386a 100644 --- a/source/duke3d/src/gamevars.cpp +++ b/source/duke3d/src/gamevars.cpp @@ -575,7 +575,7 @@ size_t __fastcall Gv_GetArrayAllocSize(int const arrayIdx) return Gv_GetArrayAllocSizeForCount(arrayIdx, aGameArrays[arrayIdx].size); } -size_t __fastcall Gv_GetArrayCountFromFile(int const arrayIdx, size_t const filelength) +size_t __fastcall Gv_GetArrayCountForAllocSize(int const arrayIdx, size_t const filelength) { if (aGameArrays[arrayIdx].flags & GAMEARRAY_BITMAP) return filelength << 3; diff --git a/source/duke3d/src/gamevars.h b/source/duke3d/src/gamevars.h index 34dd7d999..b4bae94da 100644 --- a/source/duke3d/src/gamevars.h +++ b/source/duke3d/src/gamevars.h @@ -119,7 +119,7 @@ extern int32_t g_gameArrayCount; unsigned __fastcall Gv_GetArrayElementSize(int const arrayIdx); size_t __fastcall Gv_GetArrayAllocSizeForCount(int const arrayIdx, size_t const count); size_t __fastcall Gv_GetArrayAllocSize(int const arrayIdx); -size_t __fastcall Gv_GetArrayCountFromFile(int const arrayIdx, size_t const filelength); +size_t __fastcall Gv_GetArrayCountForAllocSize(int const arrayIdx, size_t const filelength); int __fastcall Gv_GetArrayValue(int const id, int index); int __fastcall Gv_GetVar(int gameVar, int spriteNum, int playerNum); void __fastcall Gv_SetVar(int const gameVar, int const newValue, int const spriteNum, int const playerNum);