Commit 0f265be2 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

gribScanTimestep: abort if rindex >= nrecs

parent 6700d371
! This file was automatically generated, don't edit!
!
! Fortran interface for CDI library version 1.4.8
! Fortran interface for CDI library version 1.5.0
!
! Author:
! -------
......
......@@ -1133,6 +1133,8 @@ int cgribexScanTimestep(int streamID)
gribbuffer = (unsigned char *) realloc(gribbuffer, buffersize);
}
if ( rindex >= nrecs ) break;
readsize = recsize;
rstatus = gribRead(fileID, gribbuffer, &readsize);
if ( rstatus )
......
......@@ -1461,6 +1461,9 @@ int gribapiScanTimestep(int streamID)
streamptr->ntsteps = streamptr->rtsteps + 1;
break;
}
if ( rindex >= nrecs ) break;
if ( recsize > buffersize )
{
buffersize = recsize;
......
Supports Markdown
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