Changed uint8 to int inside the calculateCRC method