diff --git a/src/interfaces/reader/eas3.c b/src/interfaces/reader/eas3.c index f3e2985..4ab8203 100644 --- a/src/interfaces/reader/eas3.c +++ b/src/interfaces/reader/eas3.c @@ -401,13 +401,13 @@ bwc_to_eas3(bwc_stream *const stream, eas3_data *const data) { data->field.d = NULL; data->field.f = calloc(size, sizeof(float)); - memcpy(data->field.f, stream->out, size); + memcpy(data->field.f, stream->out, size*sizeof(float)); } else if(params->accuracy == 2) { data->field.f = NULL; data->field.d = calloc(size, sizeof(double)); - memcpy(data->field.d, stream->out, size); + memcpy(data->field.d, stream->out, size*sizeof(double)); } return 0;