Skip to contentSkip to conversation

[7022] vnc: Fix incorrect attempt to clear a flag

Qemu-devel Aurelien Jarno 1 participant 1 message Apr 7, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 7022

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7022
Author:   aurel32
Date:     2009-04-07 19:57:09 +0000 (Tue, 07 Apr 2009)

Log Message:
-----------
vnc: Fix incorrect attempt to clear a flag

In vnc.c in pixel_format_message, the code tries to clear the QEMU_ALLOCATED_FLAG from the client display surface, however it uses the wrong operator and ends up enabling all other flags. Most notably this enables the big endian flag and causes some chaos.

Modified Paths:
--------------
trunk/vnc.c

Modified: trunk/vnc.c
===================================================================

vnc.c +1 -1
@@ -1598,7 +1598,7 @@
     else if (vs->ds->surface->pf.bits_per_pixel == 8)
         vs->send_hextile_tile = send_hextile_tile_8;
     vs->clientds = *(vs->ds->surface);
-    vs->clientds.flags |= ~QEMU_ALLOCATED_FLAG;
+    vs->clientds.flags &= ~QEMU_ALLOCATED_FLAG;
     vs->write_pixels = vnc_write_pixels_copy;
 
     vnc_write(vs, pad, 3);           /* padding */