fix(AutoPlan): 解决地脉数据解析中的数组越界问题

- 在访问friendshipTeam字段前添加数组长度检查
- 在访问useFragileResin字段前添加数组长度检查
- 在访问useTransientResin字段前添加数组长度检查
- 在访问isGoToSynthesizer字段前添加数组长度检查
- 在访问useAdventurerHandbook字段前添加数组长度检查
- 在访问isNotification字段前添加数组长度检查
- 在访问timeout字段前添加数组长度检查
- 防止因数组索引超出范围导致的解析错误
This commit is contained in:
yan
2026-02-17 12:35:35 +08:00
parent 8fffb2302c
commit 0d52aa52d0

View File

@@ -297,18 +297,25 @@ async function loadMode(Load, autoOrderSet, runConfig) {
index++
autoLeyLineOutcrop.leyLineOutcropType=arr[index]
index++
if (index<arr.length)
autoLeyLineOutcrop.friendshipTeam=arr[index]
index++
if (index<arr.length)
autoLeyLineOutcrop.useFragileResin=arr[index].trim()!==""
index++
if (index<arr.length)
autoLeyLineOutcrop.useTransientResin=arr[index].trim()!==""
index++
if (index<arr.length)
autoLeyLineOutcrop.isGoToSynthesizer=arr[index].trim()!==""
index++
if (index<arr.length)
autoLeyLineOutcrop.useAdventurerHandbook=arr[index].trim()!==""
index++
if (index<arr.length)
autoLeyLineOutcrop.isNotification=arr[index].trim()!==""
index++
if (index<arr.length)
autoLeyLineOutcrop.timeout=parseInteger(arr[index])
autoOrder.autoLeyLineOutcrop=autoLeyLineOutcrop // 将地脉信息对象添加到顺序对象中