[Spice-devel] [PATCH] common, canvas_get_jpeg_alpha: let top_down be any value

Alon Levy alevy at redhat.com
Wed Jan 5 05:33:08 PST 2011


Allow top_down flag to have any value, only ASSERT it is positive
when needs to be positive and zero otherwise. Allows older server
bug of sending 4 instead of 1 in top down flag to not affect newer
clients (previous patch fixes server).
---
 common/canvas_base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/canvas_base.c b/common/canvas_base.c
index db83245..3b0f801 100644
--- a/common/canvas_base.c
+++ b/common/canvas_base.c
@@ -612,7 +612,7 @@ static pixman_image_t *canvas_get_jpeg_alpha(CanvasBase *canvas,
                     &lz_alpha_width, &lz_alpha_height, &n_comp_pixels,
                     &lz_alpha_top_down, NULL);
     ASSERT(lz_alpha_type == LZ_IMAGE_TYPE_XXXA);
-    ASSERT(lz_alpha_top_down == alpha_top_down);
+    ASSERT(!!lz_alpha_top_down == !!alpha_top_down);
     ASSERT(lz_alpha_width == width);
     ASSERT(lz_alpha_height == height);
     ASSERT(n_comp_pixels == width * height);
-- 
1.7.3.4



More information about the Spice-devel mailing list