Fix @ExpectPlatform for longs and doubles

This commit is contained in:
shedaniel
2020-12-05 20:09:42 +08:00
parent 15da1618d3
commit 6a130e0341

View File

@@ -32,7 +32,10 @@ fun transformExpectPlatform(): (ClassNode, (String, ByteArray) -> Unit) -> Class
} else when (char) {
'[' -> Unit
'L' -> inClass = true
else -> method.instructions.addLoad(char, index++)
else -> method.instructions.addLoad(char, when (char) {
'J', 'D' -> index.also { index += 2 }
else -> index++
})
}
cursor++
}