mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
Release v6.3.5 (#15813)
## Summary by Sourcery Bug Fixes: - 通过在执行子字符串操作之前验证字符串长度,在从战场击杀文本中提取击杀数量时,防止潜在的越界访问。 <details> <summary>Original summary in English</summary> ## Summary by Sourcery Bug Fixes: - Prevent potential out-of-range access when extracting kill count from battlefield kill text by validating the string length before substring operations. </details> <details> <summary>Original summary in English</summary> ## Summary by Sourcery Bug Fixes: - 通过在执行子字符串操作之前验证字符串长度,在从战场击杀文本中提取击杀数量时,防止潜在的越界访问。 <details> <summary>Original summary in English</summary> ## Summary by Sourcery Bug Fixes: - Prevent potential out-of-range access when extracting kill count from battlefield kill text by validating the string length before substring operations. </details> </details>
This commit is contained in:
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,4 +1,4 @@
|
||||
## v6.3.4
|
||||
## v6.3.5
|
||||
|
||||
### 拉电线不知天地为何物 | Highlight
|
||||
|
||||
@@ -65,6 +65,16 @@ We warmly welcome community developers to assist with adaptation and submit impr
|
||||
|
||||
以下是详细内容:
|
||||
|
||||
## v6.3.5
|
||||
|
||||
### 修复 | Fix
|
||||
|
||||
* 击杀数部分识别错误情况下闪退 @ABA2396
|
||||
|
||||
### 其他 | Other
|
||||
|
||||
* 调整 BattleKills roi @ABA2396
|
||||
|
||||
## v6.3.4
|
||||
|
||||
### 修复 | Fix
|
||||
|
||||
@@ -3771,7 +3771,7 @@
|
||||
"algorithm": "OcrDetect",
|
||||
"isAscii": true,
|
||||
"text": [],
|
||||
"roi": [50, 0, 100, 40],
|
||||
"roi": [50, -20, 100, 40],
|
||||
"useRaw": false,
|
||||
"specialParams_doc": "Kill区域变化阈值, 模板匹配, 100=1.0; 正常在 0.997-1 之间波动, 少有0.995; _5->_6 的分数最高, 可达0.94",
|
||||
"specialParams": [98]
|
||||
|
||||
@@ -309,6 +309,16 @@ BattlefieldMatcher::MatchResult<std::pair<int, int>> BattlefieldMatcher::kills_a
|
||||
}
|
||||
}
|
||||
|
||||
if (kills_text.length() <= pos + 1) {
|
||||
Log.error(
|
||||
"kills_text length is too short: text='{}', length={}, pos={}",
|
||||
kills_text,
|
||||
kills_text.size(),
|
||||
pos
|
||||
);
|
||||
return {};
|
||||
}
|
||||
|
||||
// 例子中的"0"
|
||||
std::string kills_count = kills_text.substr(0, pos);
|
||||
if (kills_count.empty() || !std::ranges::all_of(kills_count, [](char c) -> bool { return std::isdigit(c); })) {
|
||||
|
||||
Reference in New Issue
Block a user