From d67b171eede2c1749f28db93c9663badd399480e Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Wed, 26 Oct 2005 01:10:03 +0000 Subject: [PATCH] Fixed problem with .callproc(). --- psycopg/cursor_type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c index b446513c..eddab93a 100644 --- a/psycopg/cursor_type.c +++ b/psycopg/cursor_type.c @@ -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;