server/red_parse_qxl: fix bitmap_consistent again

This commit is contained in:
Alon Levy 2012-09-05 23:00:38 +03:00
parent 5819976c7e
commit 5579d8721b

View File

@ -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);