aboutsummaryrefslogtreecommitdiff
path: root/hw/display
diff options
context:
space:
mode:
Diffstat (limited to 'hw/display')
-rw-r--r--hw/display/vmware_vga.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index cdc3fed6ca..0e6673a911 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -679,10 +679,9 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
if (cursor.width > 256
|| cursor.height > 256
|| cursor.bpp > 32
- || SVGA_BITMAP_SIZE(x, y)
- > sizeof(cursor.mask) / sizeof(cursor.mask[0])
+ || SVGA_BITMAP_SIZE(x, y) > ARRAY_SIZE(cursor.mask)
|| SVGA_PIXMAP_SIZE(x, y, cursor.bpp)
- > sizeof(cursor.image) / sizeof(cursor.image[0])) {
+ > ARRAY_SIZE(cursor.image)) {
goto badcmd;
}