[Matlab] Fix detection of errors when importing Kinetics
Cast the unsigned return type of newKineticsFromXML to a signed type so that the check on the Matlab side (which looks at the sign of the return value) can detect and report errors.
This commit is contained in:
parent
452a9160f0
commit
4ca1d9dd1d
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ void kineticsmethods(int nlhs, mxArray* plhs[],
|
|||
int in2 = getInt(prhs[5]);
|
||||
int in3 = getInt(prhs[6]);
|
||||
int in4 = getInt(prhs[7]);
|
||||
vv = (double) newKineticsFromXML(root, iph, in1, in2, in3, in4);
|
||||
vv = static_cast<int>(newKineticsFromXML(root, iph, in1, in2, in3, in4));
|
||||
plhs[0] = mxCreateNumericMatrix(1,1,mxDOUBLE_CLASS,mxREAL);
|
||||
double* h = mxGetPr(plhs[0]);
|
||||
*h = vv;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue