chore: merge branch dev to main

This commit is contained in:
oSumAtrIX 2023-06-07 02:58:23 +02:00
commit 1e0ffa176e
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4
3 changed files with 16 additions and 8 deletions

View file

@ -1,3 +1,13 @@
# [10.0.0-dev.1](https://github.com/revanced/revanced-patcher/compare/v9.0.0...v10.0.0-dev.1) (2023-06-07)
* fix!: check for two methods parameters orders (#183) ([b6d6a75](https://github.com/revanced/revanced-patcher/commit/b6d6a7591ba1c0b48ffdef52352709564da8d9be)), closes [#183](https://github.com/revanced/revanced-patcher/issues/183)
### BREAKING CHANGES
* This requires changes to `MethodFingerprint`
# [9.0.0](https://github.com/revanced/revanced-patcher/compare/v8.0.0...v9.0.0) (2023-05-23)

View file

@ -1,2 +1,2 @@
kotlin.code.style = official
version = 9.0.0
version = 10.0.0-dev.1

View file

@ -220,17 +220,15 @@ private fun replaceOffset(
*/
internal fun Method.cloneMutable(registerCount: Int = 0) = clone(registerCount).toMutable()
// FIXME: also check the order of parameters as different order equals different method overload
internal fun parametersEqual(
parameters1: Iterable<CharSequence>, parameters2: Iterable<CharSequence>
): Boolean {
return parameters1.count() == parameters2.count() && parameters1.all { parameter ->
parameters2.any {
it.startsWith(
parameter
)
}
if (parameters1.count() != parameters2.count()) return false
val iterator1 = parameters1.iterator()
parameters2.forEach {
if (!it.startsWith(iterator1.next())) return false
}
return true
}
internal val nullOutputStream = object : OutputStream() {