From 60f9c53cf2e482c4ee9d2ce2f9c6f26af2f76a91 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 16 Mar 2024 16:39:14 +0000 Subject: [PATCH] lib: avoid arithmetic on void* fixes #8 --- libhyprcursor/hyprcursor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp index 6e5bb0c..5de9daf 100644 --- a/libhyprcursor/hyprcursor.cpp +++ b/libhyprcursor/hyprcursor.cpp @@ -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) {