Skip to content

Commit c5eeccc

Browse files
committed
Fix wrong returned index
CURA-12463 Shape::findInside is supposed to return NO_INDEX if there is no point inside, but when empty it was returning 0, which is definitely not a valid polygon index.
1 parent 7ae0531 commit c5eeccc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/geometry/Shape.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ size_t Shape::findInside(const Point2LL& p, bool border_result) const
262262
{
263263
if (empty())
264264
{
265-
return 0;
265+
return NO_INDEX;
266266
}
267267

268268
// NOTE: Keep these vectors fixed-size, they replace an (non-standard, sized at runtime) arrays.

0 commit comments

Comments
 (0)