Add check for integer input. No other check is performed.
This commit is contained in:
parent
a4e75f7013
commit
616afb5838
@ -14,8 +14,9 @@
|
|||||||
void mxInitGrdecl(struct grdecl *g, const mxArray *prhs[])
|
void mxInitGrdecl(struct grdecl *g, const mxArray *prhs[])
|
||||||
{
|
{
|
||||||
int i,j,k,n;
|
int i,j,k,n;
|
||||||
|
if (mxGetClassID(mxGetField(prhs[0], 0, "ACTNUM")) != mxINT32_CLASS){
|
||||||
|
mexErrMsgTxt("ACTNUM field of grid declaration must be int32");
|
||||||
|
}
|
||||||
g->coord = mxGetPr(mxGetField(prhs[0], 0, "COORD"));
|
g->coord = mxGetPr(mxGetField(prhs[0], 0, "COORD"));
|
||||||
double *tmp = mxGetPr(mxGetField(prhs[0], 0, "cartDims"));
|
double *tmp = mxGetPr(mxGetField(prhs[0], 0, "cartDims"));
|
||||||
n = 1;
|
n = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user