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

gridDefMask: bug fix for memcpy

parent 8158ea4c
......@@ -1371,7 +1371,7 @@ int gridInqMask(int gridID, int *mask)
Warning(func, "Size undefined for gridID = %d", gridID);
if ( mask && gridptr->mask )
memcpy(mask, gridptr->mask, size*sizeof(double));
memcpy(mask, gridptr->mask, size*sizeof(int));
if ( gridptr->mask == NULL ) size = 0;
......@@ -1402,7 +1402,7 @@ void gridDefMask(int gridID, const int *mask)
else if ( CDI_Debug )
Warning(func, "mask already defined!");
memcpy(gridptr->mask, mask, size*sizeof(double));
memcpy(gridptr->mask, mask, size*sizeof(int));
}
......
......@@ -1818,7 +1818,7 @@ int gribapiDefDateTime(grib_handle *gh, int timeunit, int date, int time)
default: factor = 3600; strcpy(stepunits, "h"); break;
}
len = strlen(stepunits)+1;
len = strlen(stepunits) + 1;
GRIB_CHECK(grib_set_string(gh, "stepUnits", stepunits, &len), 0);
return (factor);
......
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