Commit 90a95b7d authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdiVlistAddGridIfNew: exit if MAX_GRIDS_PS limit is exceeded.

parent a5cfb005
......@@ -4630,7 +4630,8 @@ struct addIfNewRes cdiVlistAddGridIfNew(int vlistID, grid_t *grid, int mode)
}
if ( mode < 2 )
{
xassert(ngrids < MAX_GRIDS_PS);
if (ngrids >= MAX_GRIDS_PS)
Error("Internal limit exceeded, MAX_GRIDS_PS=%d needs to be increased!", MAX_GRIDS_PS);
vlistptr->gridIDs[ngrids] = gridID;
vlistptr->ngrids++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment