k_order_welfare MEX: check number of arguments

mr#2067
Sébastien Villemot 2022-07-05 11:55:12 +02:00
parent 0a9dc0137a
commit 218bb1a15f
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,8 @@ extern "C" {
void mexFunction(int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[])
{
if (nlhs != 1 || nrhs != 3)
mexErrMsgTxt("Must have exactly 3 input arguments and 1 output argument");
const mxArray *dr_mx = prhs[0];
const mxArray *M_mx = prhs[1];