Skip to content

Commit

Permalink
fix: bad condition check on storeheader
Browse files Browse the repository at this point in the history
  • Loading branch information
gus33000 committed Sep 22, 2024
1 parent 1c4f429 commit 193ce11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Img2Ffu.Library/Writer/Data/StoreHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
3 changes: 1 addition & 2 deletions Img2Ffu/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down

0 comments on commit 193ce11

Please sign in to comment.