Only do the memcpy if NEED_ALIGNMENT is defined

TODO: configure-test which defines it


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@680 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Michael Gernoth 2004-04-27 09:04:42 +00:00
parent f0fb055450
commit 725d22c54d

View File

@ -330,13 +330,25 @@ bitmap_decompress2(uint8 * output, int width, int height, uint8 * input, int siz
insertmix = True;
break;
case 8: /* Bicolour */
#ifdef NEED_ALIGNMENT
memcpy(&colour1,&CVAL2(input),2);
#else
colour1 = CVAL2(input);
#endif
case 3: /* Colour */
#ifdef NEED_ALIGNMENT
memcpy(&colour2,&CVAL2(input),2);
#else
colour2 = CVAL2(input);
#endif
break;
case 6: /* SetMix/Mix */
case 7: /* SetMix/FillOrMix */
#ifdef NEED_ALIGNMENT
memcpy(&mix,&CVAL2(input),2);
#else
mix = CVAL2(input);
#endif
opcode -= 5;
break;
case 9: /* FillOrMix_1 */
@ -424,7 +436,11 @@ bitmap_decompress2(uint8 * output, int width, int height, uint8 * input, int siz
REPEAT(line[x] = colour2)
break;
case 4: /* Copy */
#ifdef NEED_ALIGNMENT
REPEAT(memcpy(&line[x],&CVAL2(input),2))
#else
REPEAT(line[x] = CVAL2(input))
#endif
break;
case 8: /* Bicolour */
REPEAT