From f4c4ae4ddcb934c6daf1839290a8b52a414b30c9 Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Mon, 5 Jun 2023 19:50:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=AA=E7=BA=BF=E7=9B=B4=E7=BA=BF=E6=90=9C?= =?UTF-8?q?=E7=B4=A2bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/g2d/shape.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/g2d/shape.go b/utils/g2d/shape.go index 0b00ddb..9c33f09 100644 --- a/utils/g2d/shape.go +++ b/utils/g2d/shape.go @@ -283,7 +283,7 @@ func SearchNotRepeatStraightLine(minLength int, xys ...[2]int) (result [][][2]in } end: { - if len(find) != 2 { + if len(points) < minLength-1 { continue } result = append(result, append(points, [2]int{x + left, y + top}))