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:
uye
2026-02-25 23:22:39 +08:00
committed by GitHub
3 changed files with 22 additions and 2 deletions

View File

@@ -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

View File

@@ -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]

View File

@@ -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); })) {