CopyRectangle() BPP!=8 bug fixed

pull/1/head
steven_carr 19 years ago
parent 18cd366896
commit e57c4dcd71

@ -143,7 +143,7 @@ static void CopyRectangle(rfbClient* client, uint8_t* buffer, int x, int y, int
#define COPY_RECT(BPP) \
{ \
int rs = w * BPP / 8, rs2 = client->width * BPP / 8; \
for (j = x + y * rs2; j < (y + h) * rs2; j += rs2) { \
for (j = ((x * (BPP / 8)) + (y * rs2)); j < (y + h) * rs2; j += rs2) { \
memcpy(client->frameBuffer + j, buffer, rs); \
buffer += rs; \
} \

Loading…
Cancel
Save