Skip to content
Snippets Groups Projects
Commit 7068fcc5 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

vlistChangeVarGrid: bug fix

parent 9101e12b
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
* using GRIB library version 1.0.2
* grbCopyRecord: add SZIP support
* vlistChangeVarGrid: bug fix
* cdfDefVar: set default datatype for addoffset and scalefactor to double
* cdfWriteVar*: round integer fields with NINT [report: Etienne Tourigny]
* Version 1.0.2 released
......
......@@ -1205,7 +1205,7 @@ void vlistChangeVarZaxis(int vlistID, int varID, int zaxisID)
for ( index = 0; index < vlistptr->nzaxis; index++ )
if ( vlistptr->zaxisIDs[index] == zaxisID ) break;
if ( index == nvars )
if ( index == vlistptr->nzaxis )
{
if ( vlistptr->nzaxis + 1 >= MAX_ZAXIS )
Error(func, "Maximum of %d zaxis reached", MAX_ZAXIS);
......@@ -1245,7 +1245,7 @@ void vlistChangeVarGrid(int vlistID, int varID, int gridID)
for ( index = 0; index < vlistptr->ngrids; index++ )
if ( vlistptr->gridIDs[index] == gridID ) break;
if ( index == nvars )
if ( index == vlistptr->ngrids )
{
if ( vlistptr->ngrids + 1 >= MAX_GRIDS )
Error(func, "Maximum of %d grids reached", MAX_GRIDS);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment