mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-11 03:26:37 +03:00
Check for errors in float adaptation
This commit is contained in:
parent
6cece00958
commit
5bbfd38dfb
|
@ -65,7 +65,7 @@ typecast_FLOAT_cast(const char *s, Py_ssize_t len, PyObject *curs)
|
|||
PyObject *str = NULL, *flo = NULL;
|
||||
|
||||
if (s == NULL) {Py_INCREF(Py_None); return Py_None;}
|
||||
str = Text_FromUTF8AndSize(s, len);
|
||||
if (!(str = Text_FromUTF8AndSize(s, len))) { return NULL; }
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
flo = PyFloat_FromString(str, NULL);
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue
Block a user