getOptionals() fails to recognize some options
Reported by Simon MARCHETTO
Originally assigned to Simon MARCHETTO
BUG DESCRIPTION:
----------------
Having two same options declared B, A in a function foo() as following:
int foo(...)
{
static rhs_opts opts[] =
{
{ -1, "B", -1, 0, 0, NULL},
{ -1, "A", -1, 0, 0, NULL},
{ -1, NULL, -1, 0, 0, NULL}
};
if (getOptionals(pvApiCtx, fname, opts) == 0)
{
return 1;
}
return 0;
}
in Scilab:
foo(B=1) succeeds,
foo(A=2) returns the error:
Optional arguments list:
B, and A.