#5932: fix error return in _convertPyInt_AsSsize_t() conversion function.
diff --git a/Modules/_json.c b/Modules/_json.c
index 0e30469..cfe8708 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -143,9 +143,9 @@
 {
     /* PyObject to Py_ssize_t converter */
     *size_ptr = PyInt_AsSsize_t(o);
-    if (*size_ptr == -1 && PyErr_Occurred());
-        return 1;
-    return 0;
+    if (*size_ptr == -1 && PyErr_Occurred())
+        return 0;
+    return 1;
 }
 
 static PyObject *