Skip to content

Commit

Permalink
Fixed a bug where facility could give a wrong result
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Aug 29, 2024
1 parent c40f9cb commit d5a85f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Elmah.Io.HResults/HResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static HResult Parse(int i)
var hresult = new HResult();
var isFailure = (i & 0x80000000) != 0;
hresult.IsFailure = isFailure;
var facility = (i & 0x7FFF0000) >> 16;
var facility = (i >> 16) & 0x1FFF;
hresult.Facility = facility.ToFacility();
hresult.Hex = $"0x{i:X8}";
var code = (i & 0xFFFF);
Expand Down

0 comments on commit d5a85f2

Please sign in to comment.