mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
32-bit compile fix for tinyexr
This commit is contained in:
Vendored
+4
-4
@@ -10495,9 +10495,9 @@ static int DecodeChunk(EXRImage *exr_image, const EXRHeader *exr_header,
|
||||
return TINYEXR_ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
size_t data_size = size - (offsets[tile_idx] + sizeof(int) * 5);
|
||||
size_t data_size = size - (size_t(offsets[tile_idx]) + sizeof(int) * 5);
|
||||
const unsigned char *data_ptr =
|
||||
reinterpret_cast<const unsigned char *>(head + offsets[tile_idx]);
|
||||
reinterpret_cast<const unsigned char *>(head + size_t(offsets[tile_idx]));
|
||||
|
||||
int tile_coordinates[4];
|
||||
memcpy(tile_coordinates, data_ptr, sizeof(int) * 4);
|
||||
@@ -10565,9 +10565,9 @@ static int DecodeChunk(EXRImage *exr_image, const EXRHeader *exr_header,
|
||||
// 4 byte: scan line
|
||||
// 4 byte: data size
|
||||
// ~ : pixel data(uncompressed or compressed)
|
||||
size_t data_size = size - (offsets[y_idx] + sizeof(int) * 2);
|
||||
size_t data_size = size - (size_t(offsets[y_idx]) + sizeof(int) * 2);
|
||||
const unsigned char *data_ptr =
|
||||
reinterpret_cast<const unsigned char *>(head + offsets[y_idx]);
|
||||
reinterpret_cast<const unsigned char *>(head + size_t(offsets[y_idx]));
|
||||
|
||||
int line_no;
|
||||
memcpy(&line_no, data_ptr, sizeof(int));
|
||||
|
||||
Reference in New Issue
Block a user