Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105529
b: refs/heads/master
c: 091c82c
h: refs/heads/master
i:
  105527: d649a75
v: v3
  • Loading branch information
Roel Kluin authored and Linus Torvalds committed Jul 24, 2008
1 parent 252e331 commit ae6b588
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 816664f88707b03fde24fb09759d569ed42406cb
refs/heads/master: 091c82c01295719d47b89b38d24e41ad2066ead8
7 changes: 5 additions & 2 deletions trunk/drivers/video/amifb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2048,13 +2048,16 @@ static void amifb_copyarea(struct fb_info *info,
width = x2 - dx;
height = y2 - dy;

if (area->sx + dx < area->dx || area->sy + dy < area->dy)
return;

/* update sx,sy */
sx = area->sx + (dx - area->dx);
sy = area->sy + (dy - area->dy);

/* the source must be completely inside the virtual screen */
if (sx < 0 || sy < 0 || (sx + width) > info->var.xres_virtual ||
(sy + height) > info->var.yres_virtual)
if (sx + width > info->var.xres_virtual ||
sy + height > info->var.yres_virtual)
return;

if (dy > sy || (dy == sy && dx > sx)) {
Expand Down

0 comments on commit ae6b588

Please sign in to comment.