Commits

marcus  committed 6f25b30

Fixed 64 bit conversion issue for size-based constructor in mask.Mask.

  • Participants
  • Parent commits e7ed6bc
  • Branches pgreloaded

Comments (0)

Files changed (1)

File src/mask/mask.c

 static int
 _mask_init (PyObject *mask, PyObject *args, PyObject *kwds)
 {
-    int w, h;
+    pgint32 w, h;
     bitmask_t *m;
 
     if (!PyArg_ParseTuple (args, "ii", &w, &h))
         PyErr_Clear ();
         if (!PyArg_ParseTuple (args, "O", &size))
             return -1;
-        if (!SizeFromObj (size, (pgint32*)&w, (pgint32*)&h))
+        if (!SizeFromObj (size, &w, &h))
             return -1;
     }
     if (w <= 0 || h <= 0)
         return -1;
     }
 
-    m = bitmask_create (w, h);
+    m = bitmask_create ((int)w, (int)h);
     if (!m)
     {
         PyErr_SetString (PyExc_MemoryError, "memory allocation failed");