[Spice-commits] server/red_parse_qxl.c

Alon Levy alon at kemper.freedesktop.org
Wed Sep 5 13:01:21 PDT 2012


 server/red_parse_qxl.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5579d8721bb3f96be3bab98b568c9e5dc01b5601
Author: Alon Levy <alevy at redhat.com>
Date:   Wed Sep 5 23:00:38 2012 +0300

    server/red_parse_qxl: fix bitmap_consistent again

diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
index 175f873..82463e1 100644
--- a/server/red_parse_qxl.c
+++ b/server/red_parse_qxl.c
@@ -352,8 +352,8 @@ static int bitmap_consistent(SpiceBitmap *bitmap)
 {
     int bpp = MAP_BITMAP_FMT_TO_BITS_PER_PIXEL[bitmap->format];
 
-    if (bitmap->stride < bitmap->x * ((bpp + 7) / 8)) {
-        spice_error("image stride too small for width: %d < %d * (%d + 7) / 8 (%s=%d)\n",
+    if (bitmap->stride < ((bitmap->x * bpp + 7) / 8)) {
+        spice_error("image stride too small for width: %d < ((%d * %d + 7) / 8) (%s=%d)\n",
                     bitmap->stride, bitmap->x, bpp,
                     bitmap_format_to_string(bitmap->format),
                     bitmap->format);


More information about the Spice-commits mailing list