fix(CustomDialog): 🐛 修复 错误表达式会导致流程中断

修复后行为为:
+ 丢弃错误表达式
+ 尝试解析剩下的表达式
This commit is contained in:
Discut
2023-05-23 20:59:51 +08:00
parent 0483bfae88
commit a6c69e5e05
@@ -270,8 +270,10 @@ class CacheViewModel(application: Application) : BaseViewModel(application) {
}
val left = v[0].toInt()
val right = v[1].toInt()
if (left > right)
return IntArray(0)
if (left > right){
AppLog.put("Error expression : $s; left > right")
continue
}
for (i in left..right)
result.add(i - 1)
}