unaligned memory-access leads to bus-error on some architectures.
memcpy the value instead of a direct assignment git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@654 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
64bb8d7e46
commit
cd91125060
8
bitmap.c
8
bitmap.c
@ -330,13 +330,13 @@ bitmap_decompress2(uint8 * output, int width, int height, uint8 * input, int siz
|
|||||||
insertmix = True;
|
insertmix = True;
|
||||||
break;
|
break;
|
||||||
case 8: /* Bicolour */
|
case 8: /* Bicolour */
|
||||||
colour1 = CVAL2(input);
|
memcpy(&colour1,&CVAL2(input),2);
|
||||||
case 3: /* Colour */
|
case 3: /* Colour */
|
||||||
colour2 = CVAL2(input);
|
memcpy(&colour2,&CVAL2(input),2);
|
||||||
break;
|
break;
|
||||||
case 6: /* SetMix/Mix */
|
case 6: /* SetMix/Mix */
|
||||||
case 7: /* SetMix/FillOrMix */
|
case 7: /* SetMix/FillOrMix */
|
||||||
mix = CVAL2(input);
|
memcpy(&mix,&CVAL2(input),2);
|
||||||
opcode -= 5;
|
opcode -= 5;
|
||||||
break;
|
break;
|
||||||
case 9: /* FillOrMix_1 */
|
case 9: /* FillOrMix_1 */
|
||||||
@ -424,7 +424,7 @@ bitmap_decompress2(uint8 * output, int width, int height, uint8 * input, int siz
|
|||||||
REPEAT(line[x] = colour2)
|
REPEAT(line[x] = colour2)
|
||||||
break;
|
break;
|
||||||
case 4: /* Copy */
|
case 4: /* Copy */
|
||||||
REPEAT(line[x] = CVAL2(input))
|
REPEAT(memcpy(&line[x],&CVAL2(input),2))
|
||||||
break;
|
break;
|
||||||
case 8: /* Bicolour */
|
case 8: /* Bicolour */
|
||||||
REPEAT
|
REPEAT
|
||||||
|
Loading…
Reference in New Issue
Block a user