+2006-05-09 Vesa Jaaskelainen <chaac@nic.fi>
+
+ * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
+ checking.
+ (grub_video_vbe_blit_glyph): Likewise.
+ (grub_video_vbe_blit_bitmap): Likewise.
+ (grub_video_vbe_blit_render_target): Likewise.
+
2006-05-09 Yoshinori K. Okuji <okuji@enbug.org>
* configure.ac (--with-platform): Properly quote the square
unsigned int i, j;
/* Make sure there is something to do. */
- if ((x > (int)render_target->viewport.width) || (x + (int)width < 0))
+ if ((x >= (int)render_target->viewport.width) || (x + (int)width < 0))
return GRUB_ERR_NONE;
- if ((y > (int)render_target->viewport.height) || (y + (int)height < 0))
+ if ((y >= (int)render_target->viewport.height) || (y + (int)height < 0))
return GRUB_ERR_NONE;
/* Do not allow drawing out of viewport. */
unsigned int y_offset = 0;
/* Make sure there is something to do. */
- if (x > (int)render_target->viewport.width)
+ if (x >= (int)render_target->viewport.width)
return GRUB_ERR_NONE;
- if (y > (int)render_target->viewport.height)
+ if (y >= (int)render_target->viewport.height)
return GRUB_ERR_NONE;
/* Calculate glyph dimensions. */
unsigned int width, unsigned int height)
{
/* Make sure there is something to do. */
- if ((x > (int)render_target->viewport.width) || (x + (int)width < 0))
+ if ((x >= (int)render_target->viewport.width) || (x + (int)width < 0))
return GRUB_ERR_NONE;
- if ((y > (int)render_target->viewport.height) || (y + (int)height < 0))
+ if ((y >= (int)render_target->viewport.height) || (y + (int)height < 0))
return GRUB_ERR_NONE;
/* Do not allow drawing out of viewport. */
/* Make sure there is something to do. */
if ((width == 0) || (height == 0))
return GRUB_ERR_NONE;
- if ((x > (int)render_target->viewport.width) || (x + (int)width < 0))
+ if ((x >= (int)render_target->viewport.width) || (x + (int)width < 0))
return GRUB_ERR_NONE;
- if ((y > (int)render_target->viewport.height) || (y + (int)height < 0))
+ if ((y >= (int)render_target->viewport.height) || (y + (int)height < 0))
return GRUB_ERR_NONE;
if ((x + (int)source->mode_info.width) < 0)
return GRUB_ERR_NONE;
if ((y + (int)source->mode_info.height) < 0)
return GRUB_ERR_NONE;
- if ((offset_x > (int)source->mode_info.width)
- || (offset_x + (int)source->mode_info.width < 0))
+ if ((offset_x >= (int)source->mode_info.width)
+ || (offset_x + (int)width < 0))
return GRUB_ERR_NONE;
- if ((offset_y > (int)source->mode_info.height)
- || (offset_y + (int)source->mode_info.height < 0))
+ if ((offset_y >= (int)source->mode_info.height)
+ || (offset_y + (int)height < 0))
return GRUB_ERR_NONE;
/* If we have negative coordinates, optimize drawing to minimum. */