fix(MethodResolver): strip labels and line numbers so opcode patterns match

This commit is contained in:
Lucaskyy
2022-03-24 20:58:10 +01:00
committed by oSumAtrIX
parent b197956e39
commit 699c730a7c
2 changed files with 11 additions and 12 deletions

View File

@@ -38,7 +38,8 @@ private class NodeStringBuilder {
}
override fun toString(): String {
if (sb.isEmpty()) return ""
val s = sb.toString()
return s.substring(0 until s.length - 2) // remove the last ", "
return s.substring(0 .. (s.length - 2).coerceAtLeast(0)) // remove the last ", "
}
}