Browse Source

- fixed cast warning

development
Andreas Romeyke 10 months ago
parent
commit
ab0d38c10b
  1. 6
      src/validate_icc/check_icc_header.c

6
src/validate_icc/check_icc_header.c

@ -241,9 +241,9 @@ icc_returncode_t parse_icc(unsigned long iccsize, char* iccdata, unsigned long e
assert(errmessage != NULL);
assert(errsize > 0);
if (iccsize < 10) FAIL (icc_error_header_generic, "Invalid ICC profile, size is less 10 bytes");
unsigned short a = (iccdata[8]) & 0x000f;
unsigned short b = ((iccdata[9] & 0x00f0) >>4);
unsigned short c = (iccdata[9] & 0x000f);
unsigned short a = (unsigned short) ((iccdata[8]) & 0x000f);
unsigned short b = (unsigned short) ((iccdata[9] & 0x00f0) >> 4);
unsigned short c = (unsigned short) (iccdata[9] & 0x000f);
char profileversion[6]=" ";
snprintf(profileversion, 6, "%1i.%1i.%1i", a, b, c);
INFO("ICC: profileversion='%s'\n", profileversion);

Loading…
Cancel
Save