From ef6009f71c3f18c63207102f18310d62e132a406 Mon Sep 17 00:00:00 2001 From: Anton Samokhvalov Date: Thu, 5 Jan 2023 16:37:53 +0300 Subject: [PATCH] fix clang build (#24) --- src/hyprpicker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hyprpicker.cpp b/src/hyprpicker.cpp index 4c1802b..8ac7019 100644 --- a/src/hyprpicker.cpp +++ b/src/hyprpicker.cpp @@ -344,7 +344,7 @@ CColor CHyprpicker::getColorFromPixel(CLayerSurface* pLS, Vector2D pix) { unsigned char green; unsigned char red; unsigned char alpha; - }* px = (struct pixel*)(pLS->screenBuffer.data + (int)pix.y * (int)pLS->screenBuffer.pixelSize.x * 4 + (int)pix.x * 4); + }* px = (struct pixel*)((char*)pLS->screenBuffer.data + (int)pix.y * (int)pLS->screenBuffer.pixelSize.x * 4 + (int)pix.x * 4); return CColor{(uint8_t)px->red, (uint8_t)px->green, (uint8_t)px->blue, (uint8_t)px->alpha}; -} \ No newline at end of file +}