Fix a crash when parsing long key IDs (#959)

Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Fabian Henneke
2020-07-23 13:54:53 +02:00
committed by GitHub
parent 273d0d555c
commit fbd84fde3a

View File

@@ -257,8 +257,8 @@ class PasswordCreationActivity : BasePgpActivity(), OpenPgpServiceConnection.OnB
it.matches("[a-fA-F0-9]{16}".toRegex())
}
if (maybeLongKeyId != null) {
val keyId = maybeLongKeyId.toULong()
return GpgIdentifier.KeyId(maybeLongKeyId.toLong())
val keyId = maybeLongKeyId.toULong(16)
return GpgIdentifier.KeyId(keyId.toLong())
}
// Match fingerprints: