aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/replaymod/gradle/remap
diff options
context:
space:
mode:
authorJonas Herzig <jonas@spark-squared.com>2021-11-11 21:22:12 +0100
committerJonas Herzig <jonas@spark-squared.com>2021-11-12 15:23:25 +0100
commit117d1cf035edc83017e344a6142c40cd72420642 (patch)
tree0be285499790af2ca286062170e5fb01ceffc7cb /src/main/kotlin/com/replaymod/gradle/remap
parentf1224518f86b0160149544dc8d56505a37a186e2 (diff)
downloadRemap-117d1cf035edc83017e344a6142c40cd72420642.tar.gz
Remap-117d1cf035edc83017e344a6142c40cd72420642.tar.bz2
Remap-117d1cf035edc83017e344a6142c40cd72420642.zip
Fix @At target in constant being duplicated if remapped twice
Diffstat (limited to 'src/main/kotlin/com/replaymod/gradle/remap')
-rw-r--r--src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt b/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
index c620c4c..bcade7e 100644
--- a/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
+++ b/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
@@ -473,7 +473,7 @@ internal class PsiMapper(
if ("target" != attribute.name) continue
val (value, signature) = attribute.resolvedLiteralValue ?: continue
val newSignature = remapMixinTarget(signature)
- if (newSignature != signature) {
+ if (newSignature != signature && valid(value)) {
replace(value, "\"$newSignature\"")
}
}