Permalink
Browse files

Move up <0 check to before cast to unsigned.. caught by icpc.

  • Loading branch information...
daniel-kristjansson committed Jun 16, 2012
1 parent f8f49a3 commit 65b0f74d8214f7f41f09caa6c9b72d3fa5aebec6
Showing with 2 additions and 6 deletions.
  1. +2 −6 mythtv/libs/libmythui/mythrender_vdpau.cpp
@@ -1344,15 +1344,11 @@ bool MythRenderVDPAU::DrawBitmap(uint id, uint target,
height = std::min(src->height(), height);
}
- vdest.x0 = dst->x();
- vdest.y0 = dst->y();
+ vdest.x0 = (dst->x() < 0) ? 0 : dst->x();
+ vdest.y0 = (dst->y() < 0) ? 0 : dst->y();
vdest.x1 = dst->x() + width;
vdest.y1 = dst->y() + height;
- if (vdest.x0 < 0)
- vdest.x0 = 0;
- if (vdest.y0 < 0)
- vdest.y0 = 0;
}
if (src)

0 comments on commit 65b0f74

Please sign in to comment.