key.c (convfilter): Fix sense of error tests.
[catacomb-python] / key.c
diff --git a/key.c b/key.c
index 5511699..dff59ec 100644 (file)
--- a/key.c
+++ b/key.c
@@ -229,8 +229,8 @@ static int convfilter(PyObject *x, void *p)
       goto end;
     else if (n != 2)
       goto tyerr;
-    else if ((a = PySequence_GetItem(x, 0)) == 0 || convuint(a, &f->f) ||
-            (b = PySequence_GetItem(x, 1)) == 0 || convuint(b, &f->m))
+    else if ((a = PySequence_GetItem(x, 0)) == 0 || !convuint(a, &f->f) ||
+            (b = PySequence_GetItem(x, 1)) == 0 || !convuint(b, &f->m))
       goto end;
   }
   rc = 1;