diff --git a/Img2Ffu.Library/Writer/Data/StoreHeader.cs b/Img2Ffu.Library/Writer/Data/StoreHeader.cs index b06778b..700865a 100644 --- a/Img2Ffu.Library/Writer/Data/StoreHeader.cs +++ b/Img2Ffu.Library/Writer/Data/StoreHeader.cs @@ -107,7 +107,7 @@ public byte[] GetResultingBuffer(FlashUpdateVersion storeHeaderVersion, FlashUpd CompressionAlgorithm = (uint)storeHeaderCompressionAlgorithm; break; case FlashUpdateVersion.V2: - if (!string.IsNullOrEmpty(DevicePath)) + if (string.IsNullOrEmpty(DevicePath)) { throw new ArgumentException(nameof(DevicePath)); } diff --git a/Img2Ffu/Program.cs b/Img2Ffu/Program.cs index 63d3e82..1a7f1d5 100644 --- a/Img2Ffu/Program.cs +++ b/Img2Ffu/Program.cs @@ -246,8 +246,7 @@ private static void Main(string[] args) catch (Exception ex) { Logging.Log("Something happened.", LoggingLevel.Error); - Logging.Log(ex.Message, LoggingLevel.Error); - Logging.Log(ex.StackTrace!, LoggingLevel.Error); + Logging.Log(ex.ToString(), LoggingLevel.Error); Environment.Exit(1); } });