Skip to content

Commit

Permalink
Fix passing zero to pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
jfowkes committed Apr 24, 2024
1 parent a45d306 commit 39e969d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pycutest/c_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@
doublereal *x, *sv;
doublereal f;
npy_int *si;
npy_int nnzg;
npy_int nnzg, nzero=0;
if (!check_setup())
return NULL;
Expand All @@ -1467,7 +1467,7 @@
x=(npy_double *)PyArray_DATA(arg1);
if (PyObject_Length(args)==1) {
CUTEST_cofsg((integer *)&status, (integer *)&CUTEst_nvar, x, &f, (integer *)&nnzg, 0, NULL, NULL, &somethingFalse);
CUTEST_cofsg((integer *)&status, (integer *)&CUTEst_nvar, x, &f, (integer *)&nnzg, (integer *)&nzero, NULL, NULL, &somethingFalse);
return Py_BuildValue("d", f);
} else {
si=(npy_int *)malloc(CUTEst_nvar*sizeof(npy_int));
Expand Down

0 comments on commit 39e969d

Please sign in to comment.