summary refs log tree commit diff
path: root/crypto/src/asn1/x500/style/IetfUtilities.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/x500/style/IetfUtilities.cs')
-rw-r--r--crypto/src/asn1/x500/style/IetfUtilities.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/crypto/src/asn1/x500/style/IetfUtilities.cs b/crypto/src/asn1/x500/style/IetfUtilities.cs
index acc1ed72e..dd2996bae 100644
--- a/crypto/src/asn1/x500/style/IetfUtilities.cs
+++ b/crypto/src/asn1/x500/style/IetfUtilities.cs
@@ -89,10 +89,9 @@ namespace Org.BouncyCastle.Asn1.X500.Style
 
             if (buf.Length > 0)
             {
-                int last = buf.Length - 1;
-                while (buf[last] == ' ' && lastEscaped != last)
+                while (buf[buf.Length - 1] == ' ' && lastEscaped != buf.Length - 1)
                 {
-                    buf.Length = last;
+                    buf.Length = buf.Length - 1;
                 }
             }
 
@@ -107,13 +106,11 @@ namespace Org.BouncyCastle.Asn1.X500.Style
         private static int ConvertHex(char c)
         {
             if ('0' <= c && c <= '9')
-            {
                 return c - '0';
-            }
+
             if ('a' <= c && c <= 'f')
-            {
                 return c - 'a' + 10;
-            }
+
             return c - 'A' + 10;
         }