diff --git a/src/canvas.cpp b/src/canvas.cpp index 48c35c5..783769d 100644 --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -1283,8 +1283,8 @@ void ui::Canvas::inject_xmp(std::string jpg_path) unsigned char* xmp_section = (unsigned char*)malloc(sizeof(xmp) + 4); xmp_section[0] = 0xff; xmp_section[1] = 0xe1; - xmp_section[2] = (uint8_t)((int)sizeof(xmp) + 2) >> 8; - xmp_section[3] = (uint8_t)((int)sizeof(xmp) + 2) >> 0; + xmp_section[2] = ((int)sizeof(xmp) + 2) >> 8; + xmp_section[3] = ((int)sizeof(xmp) + 2) >> 0; memcpy(xmp_section + 4, xmp, sizeof(xmp)); fwrite(jpeg_data, 1, i, fp);