diff options
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r-- | Modules/unicodedata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 297611c..0660353 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -209,7 +209,7 @@ unicodedata_numeric(PyObject *self, PyObject *args) if (old->category_changed == 0) { /* unassigned */ have_old = 1; - rc = -1; + rc = -1.0; } else if (old->decimal_changed != 0xFF) { have_old = 1; @@ -219,7 +219,7 @@ unicodedata_numeric(PyObject *self, PyObject *args) if (!have_old) rc = Py_UNICODE_TONUMERIC(*PyUnicode_AS_UNICODE(v)); - if (rc < 0) { + if (rc == -1.0) { if (defobj == NULL) { PyErr_SetString(PyExc_ValueError, "not a numeric character"); return NULL; |