From 3c95df5cc15ae1b4fccaaca61db0abaabe964676 Mon Sep 17 00:00:00 2001 From: tohidemyname Date: Fri, 21 Jun 2024 15:54:23 +0800 Subject: [PATCH] fixing another wrong delete in PgpPublicKey --- 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..ed8a1c25c 100644 --- a/crypto/src/openpgp/PgpPublicKey.cs +++ b/crypto/src/openpgp/PgpPublicKey.cs @@ -1100,7 +1100,7 @@ private static PgpPublicKey RemoveCert(PgpPublicKey key, IUserDataPacket id, Pgp 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])) {