From 63ae19bdc4aa63159bb05d8c0aba4fc3557ff32d Mon Sep 17 00:00:00 2001 From: Mitchell Syer Date: Wed, 19 Jun 2024 14:40:12 -0400 Subject: [PATCH] Fix crash --- .../src/main/kotlin/dev/icerock/gradle/utils/StringExt.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources-generator/src/main/kotlin/dev/icerock/gradle/utils/StringExt.kt b/resources-generator/src/main/kotlin/dev/icerock/gradle/utils/StringExt.kt index 89bc16fa..0778a593 100644 --- a/resources-generator/src/main/kotlin/dev/icerock/gradle/utils/StringExt.kt +++ b/resources-generator/src/main/kotlin/dev/icerock/gradle/utils/StringExt.kt @@ -63,7 +63,7 @@ internal fun String.convertXmlStringToAndroidLocalization(): String { .replace("\n", "\\n") .let { StringEscapeUtils.escapeXml11(it) } .let { - if (it[0] == '@') { + if (it.getOrNull(0) == '@') { replaceFirst("@", """\@""") } else { it