mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 23:49:00 +08:00
Remove compile warning and possible error on zero size
This commit is contained in:
@@ -364,6 +364,9 @@ bool_t InitializePolygonSurvey(uint8_t EntryWP, uint8_t Size, float sw, float Or
|
||||
struct Point2D Corners[PolygonSize];
|
||||
|
||||
CSurveyStatus = Init;
|
||||
|
||||
if (Size == 0)
|
||||
return TRUE;
|
||||
|
||||
//Don't initialize if Polygon is too big or if the orientation is not between 0 and 90
|
||||
if(Size <= PolygonSize && Orientation >= -90 && Orientation <= 90)
|
||||
|
||||
Reference in New Issue
Block a user