--- sourceforge.net/trunk/rdesktop/mppc.c 2004/05/04 09:48:45 689 +++ sourceforge.net/trunk/rdesktop/mppc.c 2004/06/15 22:45:12 711 @@ -64,7 +64,7 @@ int match_len; int old_offset, match_bits; - signed char *dict = &(g_mppc_dict.hist); + uint8 *dict = g_mppc_dict.hist; if ((ctype & RDP_MPPC_COMPRESSED) == 0) { @@ -279,7 +279,7 @@ match_bits = match_len; match_len = - walker >> 32 - match_bits & ~(-1 << match_bits) | 1 << match_bits; + ((walker >> (32 - match_bits)) & (~(-1 << match_bits))) | (1 << match_bits); walker <<= match_bits; walker_len -= match_bits; } @@ -288,7 +288,7 @@ return -1; } /* memory areas can overlap - meaning we can't use memXXX functions */ - k = next_offset - match_off & (RDP_MPPC_DICT_SIZE - 1); + k = (next_offset - match_off) & (RDP_MPPC_DICT_SIZE - 1); do { dict[next_offset++] = dict[k++];