return data only if 15 or 16 bbp in translate_image

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@644 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Jay Sorg 2004-03-29 13:59:03 +00:00
parent b6300628f5
commit c3defe8dd7

11
xwin.c
View File

@ -605,10 +605,13 @@ translate_image(int width, int height, uint8 * data)
/* if server and xserver bpp match, */
/* and arch(endian) matches, no need to translate */
/* just return data */
if (g_depth > 8)
if (g_arch_match)
if (g_depth == g_server_bpp)
return data;
if (g_arch_match)
{
if (g_depth == 15 && g_server_bpp == 15)
return data;
if (g_depth == 16 && g_server_bpp == 16)
return data;
}
size = width * height * (g_bpp / 8);
out = (uint8 *) xmalloc(size);