From a7a2bc6b0614eecbf37031fd9c6475d5bec5b2c5 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 17 Jul 2004 13:46:15 +0200 Subject: Fixed checking the last area for misalignment in cOsd::CanHandleAreas() --- osd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'osd.c') diff --git a/osd.c b/osd.c index d87bee3e..c7ec8b89 100644 --- a/osd.c +++ b/osd.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 1.55 2004/06/15 20:29:42 kls Exp $ + * $Id: osd.c 1.56 2004/07/17 13:39:30 kls Exp $ */ #include "osd.h" @@ -603,11 +603,11 @@ cBitmap *cOsd::GetBitmap(int Area) eOsdError cOsd::CanHandleAreas(const tArea *Areas, int NumAreas) { for (int i = 0; i < NumAreas; i++) { + if (Areas[i].x1 > Areas[i].x2 || Areas[i].y1 > Areas[i].y2 || Areas[i].x1 < 0 || Areas[i].y1 < 0) + return oeWrongAlignment; for (int j = i + 1; j < NumAreas; j++) { if (Areas[i].Intersects(Areas[j])) return oeAreasOverlap; - if (Areas[i].x1 > Areas[i].x2 || Areas[i].y1 > Areas[i].y2 || Areas[i].x1 < 0 || Areas[i].y1 < 0) - return oeWrongAlignment; } } return oeOk; -- cgit v1.2.3