diff options
Diffstat (limited to 'psycopg/typecast_mxdatetime.c')
-rw-r--r-- | psycopg/typecast_mxdatetime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/psycopg/typecast_mxdatetime.c b/psycopg/typecast_mxdatetime.c index e61224d..bf69af5 100644 --- a/psycopg/typecast_mxdatetime.c +++ b/psycopg/typecast_mxdatetime.c @@ -142,7 +142,7 @@ typecast_MXINTERVAL_cast(const char *str, Py_ssize_t len, PyObject *curs) case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': - v = v*10 + (double)*str - (double)'0'; + v = v * 10.0 + (double)(*str - '0'); Dprintf("typecast_MXINTERVAL_cast: v = %f", v); if (part == 6){ denominator *= 10; |