Skip to content
Snippets Groups Projects
Commit be6f82f1 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed bug (wrong size in memcpy for the last input argument).

parent 627b24dd
Branches
Tags
No related merge requests found
...@@ -153,7 +153,7 @@ void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) ...@@ -153,7 +153,7 @@ void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
cholcov = (double *) mxCalloc(dimension*dimension,sizeof(double)); cholcov = (double *) mxCalloc(dimension*dimension,sizeof(double));
double *tmp; double *tmp;
tmp = (double *) mxCalloc(dimension*dimension,sizeof(double)); tmp = (double *) mxCalloc(dimension*dimension,sizeof(double));
memcpy(tmp,mxGetPr(prhs[4]),dimension*2*sizeof(double)); memcpy(tmp,mxGetPr(prhs[4]),dimension*dimension*sizeof(double));
cholcov = &tmp[0]; cholcov = &tmp[0];
identity_covariance_matrix = 0; identity_covariance_matrix = 0;
} }
...@@ -163,7 +163,7 @@ void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) ...@@ -163,7 +163,7 @@ void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{ {
double *tmp; double *tmp;
tmp = (double *) mxCalloc(1,sizeof(double)); tmp = (double *) mxCalloc(1,sizeof(double));
memcpy(tmp,mxGetPr(prhs[4]),dimension*2*sizeof(double)); memcpy(tmp,mxGetPr(prhs[4]),sizeof(double));
radius = tmp[0]; radius = tmp[0];
unit_radius = 0; unit_radius = 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment