Fixed problem with .callproc().

This commit is contained in:
Federico Di Gregorio 2005-10-26 01:10:03 +00:00
parent 0a73b75c51
commit d67b171eed

View File

@ -890,7 +890,7 @@ psyco_curs_callproc(cursorObject *self, PyObject *args, PyObject *kwargs)
}
/* allocate some memory, build the SQL and create a PyString from it */
sl = strlen(procname) + 10 + nparameters*3;
sl = strlen(procname) + 10 + nparameters*3 - (nparameters ? 1 : 0);
sql = (char*)PyMem_Malloc(sl);
if (sql == NULL) return NULL;