Commit fde9641f authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

grb_read_next_record: restrict workerCount to number of records.

parent 2b4abb38
......@@ -199,9 +199,11 @@ void grb_read_next_record(stream_t *streamptr, int recID, int memtype, void *dat
{
bool jobFound = false;
const int workerCount = streamptr->numWorker;
int workerCount = streamptr->numWorker;
if (workerCount > 0)
{
if (workerCount > streamptr->tsteps[0].nrecs) workerCount = streamptr->tsteps[0].nrecs;
AsyncManager *jobManager = (AsyncManager *) streamptr->jobManager;
JobDescriptor *jobs = (JobDescriptor *) streamptr->jobs;
......
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