lib: avoid arithmetic on void*

fixes #8
This commit is contained in:
Vaxry 2024-03-16 16:39:14 +00:00
parent 1761f6cefd
commit 60f9c53cf2

View file

@ -508,7 +508,7 @@ static cairo_status_t readPNG(void* data, unsigned char* output, unsigned int le
size_t toRead = len > DATA->dataLen - DATA->readNeedle ? DATA->dataLen - DATA->readNeedle : len;
std::memcpy(output, DATA->data + DATA->readNeedle, toRead);
std::memcpy(output, (uint8_t*)DATA->data + DATA->readNeedle, toRead);
DATA->readNeedle += toRead;
if (DATA->readNeedle >= DATA->dataLen) {