Skip to content

Commit ca7eda3

Browse files
committed
Fix compile errors: escape Kotlin string template, Long→Int cast
- CnameCloakUpdater: escape $ in "\$important" suffix removal - OfflineGeoIp: cast autonomousSystemNumber Long to Int for GeoResult
1 parent f51e4aa commit ca7eda3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/app/src/main/java/com/hostshield/service/CnameCloakUpdater.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class CnameCloakUpdater @Inject constructor(
140140
val domain = line
141141
.removePrefix("||")
142142
.removeSuffix("^")
143-
.removeSuffix("$important")
143+
.removeSuffix("\$important")
144144
.trim()
145145
.lowercase()
146146
if (domain.isNotBlank() && domain.contains('.') && !domain.contains(' ')

app/app/src/main/java/com/hostshield/util/OfflineGeoIp.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class OfflineGeoIp @Inject constructor(
110110
country = country?.country?.name ?: "",
111111
countryCode = countryCode,
112112
continent = country?.continent?.name ?: "",
113-
asn = asn?.autonomousSystemNumber ?: 0,
113+
asn = (asn?.autonomousSystemNumber ?: 0L).toInt(),
114114
asnOrg = asn?.autonomousSystemOrganization ?: "",
115115
flag = countryCodeToFlag(countryCode)
116116
)

0 commit comments

Comments
 (0)