summaryrefslogtreecommitdiff
path: root/ui/vnc-enc-tight.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/vnc-enc-tight.c')
-rw-r--r--ui/vnc-enc-tight.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index 0b4a5ac71f..d20cd1d86d 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -886,11 +886,11 @@ static int tight_compress_data(VncState *vs, int stream_id, size_t bytes,
*/
static void tight_pack24(VncState *vs, uint8_t *buf, size_t count, size_t *ret)
{
- uint32_t *buf32;
+ uint8_t *buf8;
uint32_t pix;
int rshift, gshift, bshift;
- buf32 = (uint32_t *)buf;
+ buf8 = buf;
if (1 /* FIXME */) {
rshift = vs->client_pf.rshift;
@@ -907,10 +907,11 @@ static void tight_pack24(VncState *vs, uint8_t *buf, size_t count, size_t *ret)
}
while (count--) {
- pix = *buf32++;
+ pix = ldl_he_p(buf8);
*buf++ = (char)(pix >> rshift);
*buf++ = (char)(pix >> gshift);
*buf++ = (char)(pix >> bshift);
+ buf8 += 4;
}
}