Merge pull request #502 from gedoor/antecer

判断查询结果,查询失败则不修改值.
pull/508/head
Antecer 4 years ago committed by GitHub
commit b8b81ae238
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/src/main/java/io/legado/app/help/JsExtensions.kt

@ -280,7 +280,7 @@ interface JsExtensions {
val oldCode = s.toInt() val oldCode = s.toInt()
if (oldCode in start until end) { if (oldCode in start until end) {
val code = font2.GetCodeByGlyf(font1.GetGlyfByCode(oldCode)) val code = font2.GetCodeByGlyf(font1.GetGlyfByCode(oldCode))
contentArray[index] = code.toChar() if(code != 0) contentArray[index] = code.toChar()
} }
} }
return contentArray.joinToString("") return contentArray.joinToString("")

Loading…
Cancel
Save