diff --git a/library/Makefile b/library/Makefile index 2593147..7c62c1f 100644 --- a/library/Makefile +++ b/library/Makefile @@ -66,7 +66,7 @@ obj/%.o: src/%.c $(INCLUDES_SRC) clean: rm -rf $(OBJECTS_OBJ) $(EXECUTABLE) -install: +install: $(EXECUTABLE) install -m 0755 -d $(DESTDIR)$(includedir) $(DESTDIR)$(libdir) install -m 0644 -t $(DESTDIR)$(includedir) zonedetect.h ifeq ($(OS),Windows_NT) diff --git a/library/zonedetect.c b/library/zonedetect.c index 6d3e352..6f800f4 100644 --- a/library/zonedetect.c +++ b/library/zonedetect.c @@ -700,7 +700,7 @@ static ZDLookupResult ZDPointInPolygon(const ZoneDetect *library, uint32_t polyg /* Check if the target is on the border */ const int32_t intersectLon = (int32_t)(((float)latFixedPoint - b) / a); - if(intersectLon == lonFixedPoint) { + if(intersectLon >= lonFixedPoint-1 && intersectLon <= lonFixedPoint+1) { if(distanceSqrMin) *distanceSqrMin = 0; return ZD_LOOKUP_ON_BORDER_SEGMENT; }