From 35a11f534b6ff02984f5818f8b7db79cf39cdc55 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Fri, 11 Jun 2021 12:02:49 +0200 Subject: [PATCH] Fix flipped condition --- src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs b/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs index 52c8b5ea..c25efc43 100644 --- a/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs +++ b/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs @@ -686,7 +686,7 @@ private static bool TryConvertHexStringToByteArray(string hexString, out byte[]? for (int index = 0; index < data.Length; index++) { string byteValue = hexString.Substring(index * 2, 2); - if (byte.TryParse(byteValue, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out data[index])) + if (!byte.TryParse(byteValue, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out data[index])) { data = null; return false;