From 408935e04687fccdec25cbfd4cc697f48cf08c71 Mon Sep 17 00:00:00 2001 From: Matt Chapman Date: Wed, 16 Apr 2003 13:48:17 +0000 Subject: [PATCH] Fix an endianness problem. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@367 423420c4-83ab-492f-b58f-81f9feb106b5 --- xwin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xwin.c b/xwin.c index 99705ee..78883dd 100644 --- a/xwin.c +++ b/xwin.c @@ -402,8 +402,9 @@ translate24to32(uint8 * data, uint32 * out, uint32 * end) uint32 pixel = 0; while (out < end) { - memcpy(&pixel, data, 3); - data += 3; + pixel = *(data++); + pixel |= *(data++) << 8; + pixel |= *(data++) << 16; *(out++) = pixel; } }