Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader...
authorEirik Tsarpalis <eirik.tsarpalis@gmail.com>
Fri, 1 May 2020 14:24:08 +0000 (15:24 +0100)
committerGitHub <noreply@github.com>
Fri, 1 May 2020 14:24:08 +0000 (15:24 +0100)
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.Tag.cs

index 90e5980..eec82b7 100644 (file)
@@ -27,7 +27,7 @@ namespace System.Security.Cryptography.Encoding.Tests.Cbor
         {
             CborTag tag = PeekTagCore(out int additionalBytes);
 
-            if (!CborConformanceLevelHelpers.AllowsTags(ConformanceLevel) && _isConformanceLevelCheckEnabled)
+            if (_isConformanceLevelCheckEnabled && !CborConformanceLevelHelpers.AllowsTags(ConformanceLevel))
             {
                 throw new FormatException("Tagged items are not permitted under the current conformance level.");
             }