From df40fb8e49caa7fb2bf982279754f265dbff94c3 Mon Sep 17 00:00:00 2001 From: Horror Proton <107091537+horror-proton@users.noreply.github.com> Date: Sun, 9 Apr 2023 10:51:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E7=BD=95=E8=A7=81=E7=9A=84=E8=82=89=E9=B8=BD=E5=B4=A9=E6=BA=83?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaCore/Vision/Battle/BattleImageAnalyzer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MaaCore/Vision/Battle/BattleImageAnalyzer.cpp b/src/MaaCore/Vision/Battle/BattleImageAnalyzer.cpp index a77cde073b..a488f39d48 100644 --- a/src/MaaCore/Vision/Battle/BattleImageAnalyzer.cpp +++ b/src/MaaCore/Vision/Battle/BattleImageAnalyzer.cpp @@ -170,6 +170,9 @@ bool asst::BattleImageAnalyzer::opers_analyze() if (cooling_rect.x + cooling_rect.width >= m_image.cols) { cooling_rect.width = m_image.cols - cooling_rect.x; } + if (cooling_rect.y + cooling_rect.height >= m_image.rows) { + cooling_rect.height = m_image.rows - cooling_rect.y; + } oper.cooling = oper_cooling_analyze(cooling_rect); if (oper.cooling && oper.available) { Log.error("oper is available, but with cooling");