summaryrefslogtreecommitdiffstats
path: root/server/red_replay_qxl.c
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2015-08-25 08:58:53 +0100
committerFrediano Ziglio <fziglio@redhat.com>2015-08-25 10:50:18 +0100
commitf01c462031890b5d4e26e0d870f67fac8a929a18 (patch)
tree641c5570ecd20f62e396eb695f4216fc310b6f25 /server/red_replay_qxl.c
parenta9e34bd27ab8e4394a0852806f0bab00eabb79e6 (diff)
downloadspice-f01c462031890b5d4e26e0d870f67fac8a929a18.tar.gz
spice-f01c462031890b5d4e26e0d870f67fac8a929a18.tar.xz
spice-f01c462031890b5d4e26e0d870f67fac8a929a18.zip
replay: fix check for QXL_SURF_FLAG_KEEP_DATA flag
A logical and (&&) was used instead of a bit one (&). Was working just as is the only flag defined. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Fabiano Fidencio <ffidenci@redhat.com>
Diffstat (limited to 'server/red_replay_qxl.c')
-rw-r--r--server/red_replay_qxl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/red_replay_qxl.c b/server/red_replay_qxl.c
index a010a58d..5044adf9 100644
--- a/server/red_replay_qxl.c
+++ b/server/red_replay_qxl.c
@@ -1025,7 +1025,7 @@ static QXLSurfaceCmd *red_replay_surface_cmd(SpiceReplay *replay)
replay_fscanf(replay, "u.surface_create.height %d\n", &qxl->u.surface_create.height);
replay_fscanf(replay, "u.surface_create.stride %d\n", &qxl->u.surface_create.stride);
size = qxl->u.surface_create.height * abs(qxl->u.surface_create.stride);
- if (qxl->flags && QXL_SURF_FLAG_KEEP_DATA) {
+ if ((qxl->flags & QXL_SURF_FLAG_KEEP_DATA) != 0) {
read_binary(replay, "data", &read_size, (uint8_t**)&qxl->u.surface_create.data, 0);
if (read_size != size) {
spice_printerr("mismatch %ld != %ld", size, read_size);