fix: 修复一个罕见的肉鸽崩溃情况

This commit is contained in:
Horror Proton
2023-04-09 10:51:20 +08:00
parent c889529271
commit df40fb8e49

View File

@@ -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");