Commits

Fredrik Lundh committed 15bf582

Repaired PNG CRC-32 calculations.

  • Participants
  • Parent commits 88e62f7

Comments (0)

Files changed (1)

 
     unsigned char* buffer;
     int bytes;
-    int hi, lo;
+    int hi=0, lo=0;
     if (!PyArg_ParseTuple(args, ARG("s#|(ii)", "y#|(ii)"), &buffer, &bytes, &hi, &lo))
 	return NULL;
 
-    hi = lo = 0;
-
     crc = ((UINT32) (hi & 0xFFFF) << 16) + (lo & 0xFFFF);
 
     crc = ImagingCRC32(crc, (unsigned char *)buffer, bytes);