summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-01-05 15:31:46 +0200
committerAlon Levy <alevy@redhat.com>2011-01-17 18:48:50 +0200
commitf0e27a2636361bc0336cdebd69a44ecde2752ca2 (patch)
treec5d854e3f6237714fe3e03ff0f1a1204d0d211b7
parent2a9f35a98f4dabd8e1e0412d498907df3a04f71a (diff)
downloadspice-f0e27a2636361bc0336cdebd69a44ecde2752ca2.tar.gz
spice-f0e27a2636361bc0336cdebd69a44ecde2752ca2.tar.xz
spice-f0e27a2636361bc0336cdebd69a44ecde2752ca2.zip
common, canvas_get_jpeg_alpha: let top_down be any value
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).
-rw-r--r--common/canvas_base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/canvas_base.c b/common/canvas_base.c
index c2763bcc..0b7ef743 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);