made the indirection vector generation dimension count check a little safer

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401439
This commit is contained in:
David Anderson 2007-09-16 05:15:46 +00:00
parent 8d6138fba9
commit 840c6236d0

View File

@ -501,7 +501,7 @@ cell_t _GenerateArrayIndirectionVectors(array_creation_t *ar, int dim, cell_t cu
* Dimension n-x where x > 2 will have sub-vectors.
* Otherwise, we just need to reference the data section.
*/
if (dim < ar->dim_count - 2)
if (ar->dim_count > 2 && dim < ar->dim_count - 2)
{
/**
* For each index at this dimension, write offstes to our sub-vectors.