feat/api #46

Open
Gregor Weiss wants to merge 55 commits from feat/api into main
Showing only changes of commit 64eeda9072 - Show all commits

View file

@ -401,13 +401,13 @@ bwc_to_eas3(bwc_stream *const stream, eas3_data *const data)
{ {
data->field.d = NULL; data->field.d = NULL;
data->field.f = calloc(size, sizeof(float)); 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) else if(params->accuracy == 2)
{ {
data->field.f = NULL; data->field.f = NULL;
data->field.d = calloc(size, sizeof(double)); 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; return 0;