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@xxxxxxxxxx> --- server/red_record_qxl.c | 2 +- server/red_replay_qxl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/red_record_qxl.c b/server/red_record_qxl.c index d96fb79..b35b462 100644 --- a/server/red_record_qxl.c +++ b/server/red_record_qxl.c @@ -724,7 +724,7 @@ static void red_record_surface_cmd(FILE *fd, RedMemSlotInfo *slots, int group_id fprintf(fd, "u.surface_create.height %d\n", qxl->u.surface_create.height); fprintf(fd, "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) { write_binary(fd, "data", size, (uint8_t*)get_virt(slots, qxl->u.surface_create.data, size, group_id, &error)); diff --git a/server/red_replay_qxl.c b/server/red_replay_qxl.c index a010a58..5044adf 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); -- 2.4.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel