Fix ArrayObjectCount for zero sized arrays

pull/2957/head
Jelte Fennema 2019-09-06 12:40:00 +02:00
parent de5174f763
commit 257406fda7
1 changed files with 5 additions and 0 deletions

View File

@ -360,6 +360,11 @@ ArrayObjectCount(ArrayType *arrayObject)
int32 *dimensionLengthArray = ARR_DIMS(arrayObject); int32 *dimensionLengthArray = ARR_DIMS(arrayObject);
int32 arrayLength = 0; int32 arrayLength = 0;
if (dimensionCount == 0)
{
return 0;
}
/* we currently allow split point arrays to have only one subarray */ /* we currently allow split point arrays to have only one subarray */
Assert(dimensionCount == 1); Assert(dimensionCount == 1);