Bug 292 - Added more checks on zone polygons.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1966 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2006-05-08 12:46:23 +00:00
parent f22af5fc67
commit 79ca312388
1 changed files with 4 additions and 1 deletions

View File

@ -877,7 +877,10 @@ int Zone::Load( Monitor *monitor, Zone **&zones )
Debug( 5, ( "Parsing polygon %s", Coords ));
Polygon polygon;
if ( !ParsePolygonString( Coords, polygon ) )
continue;
Fatal(( "Unable to parse polygon string '%s' for zone %d/%s for monitor %s", Coords, Id, Name, monitor->Name() ));
if ( polygon.LoX() < 0 || polygon.HiX() >= monitor->Width() || polygon.LoY() < 0 || polygon.HiY() >= monitor->Height() )
Fatal(( "Zone %d/%s for monitor %s extends outside of image dimensions", Id, Name, monitor->Name() ));
if ( false && !strcmp( Units, "Percent" ) )
{