summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-07-23 13:54:53 +0200
committerGitHub <noreply@github.com>2020-07-23 17:24:53 +0530
commitfbd84fde3a25d23cbf51fe0cd609ce9bd13836cc (patch)
tree8b0270f9ec380258593dcaedacc920a4f4bc0172 /app/src/main
parent273d0d555c7ed8575d5c7c1d3c012fbd1967d04a (diff)
Fix a crash when parsing long key IDs (#959)
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt
index 6cacf4b9..ee57acf8 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt
@@ -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: