From b3e2ea5861f3d9e214fca53f610be5ffc3f31f10 Mon Sep 17 00:00:00 2001 From: tohidemyname Date: Fri, 21 Jun 2024 15:44:16 +0800 Subject: [PATCH] Fix a wrong delete --- crypto/src/openpgp/PgpPublicKey.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/src/openpgp/PgpPublicKey.cs b/crypto/src/openpgp/PgpPublicKey.cs index 672ce9548..13d87021f 100644 --- a/crypto/src/openpgp/PgpPublicKey.cs +++ b/crypto/src/openpgp/PgpPublicKey.cs @@ -1050,7 +1050,7 @@ private static PgpPublicKey RemoveCert(PgpPublicKey key, IUserDataPacket id) PgpPublicKey returnKey = new PgpPublicKey(key); bool found = false; - for (int i = 0; i < returnKey.ids.Count; i++) + for (int i = returnKey.ids.Count-1; i >=0; i--) { if (id.Equals(returnKey.ids[i])) {