bug fix; wrong size in memcpy
This commit is contained in:
parent
742fb3bc78
commit
64eeda9072
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue