don't ignore exceptions from PyObject_IsTrue
diff --git a/Modules/_struct.c b/Modules/_struct.c
index e1d016b..b5f18a9 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -591,9 +591,13 @@
 static int
 np_bool(char *p, PyObject *v, const formatdef *f)
 {
-    BOOL_TYPE y;
+    int y;
+    BOOL_TYPE x;
     y = PyObject_IsTrue(v);
-    memcpy(p, (char *)&y, sizeof y);
+    if (y < 0)
+        return -1;
+    x = y;
+    memcpy(p, (char *)&x, sizeof x);
     return 0;
 }
 
@@ -865,6 +869,8 @@
 {
     char y;
     y = PyObject_IsTrue(v);
+    if (y < 0)
+        return -1;
     memcpy(p, (char *)&y, sizeof y);
     return 0;
 }