summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-09-05 23:00:38 +0300
committerAlon Levy <alevy@redhat.com>2012-09-05 23:00:55 +0300
commit5579d8721bb3f96be3bab98b568c9e5dc01b5601 (patch)
treed5408ee4e760056afa04ba804d918170a41bb3a7
parent5819976c7ed6669f4334bb5ec8b25cd213dd7e8a (diff)
downloadspice-5579d8721bb3f96be3bab98b568c9e5dc01b5601.tar.gz
spice-5579d8721bb3f96be3bab98b568c9e5dc01b5601.tar.xz
spice-5579d8721bb3f96be3bab98b568c9e5dc01b5601.zip
server/red_parse_qxl: fix bitmap_consistent again
-rw-r--r--server/red_parse_qxl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
index 175f8736..82463e1a 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);