mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-31 05:59:51 +08:00
fix(AutoPlan): 解决地脉数据解析中的数组越界问题
- 在访问friendshipTeam字段前添加数组长度检查 - 在访问useFragileResin字段前添加数组长度检查 - 在访问useTransientResin字段前添加数组长度检查 - 在访问isGoToSynthesizer字段前添加数组长度检查 - 在访问useAdventurerHandbook字段前添加数组长度检查 - 在访问isNotification字段前添加数组长度检查 - 在访问timeout字段前添加数组长度检查 - 防止因数组索引超出范围导致的解析错误
This commit is contained in:
@@ -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 // 将地脉信息对象添加到顺序对象中
|
||||
|
||||
Reference in New Issue
Block a user