Skip to content

Commit

Permalink
Fix Util.SetBits for ulong
Browse files Browse the repository at this point in the history
  • Loading branch information
Helco committed Mar 28, 2021
1 parent 72448dc commit ed6a4ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ImGui.NET/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ internal static uint SetBits(uint oldValue, int offset, int bitCount, uint newBi
return (uint)((oldValue & ~mask) | (newBits << offset & mask));
}

internal static ulong SetBits(byte oldValue, int offset, int bitCount, ulong newBits)
internal static ulong SetBits(ulong oldValue, int offset, int bitCount, ulong newBits)
{
var mask = (ulong)((1 << bitCount) - 1 << offset);
return (ulong)((oldValue & ~mask) | (newBits << offset & mask));
Expand Down

0 comments on commit ed6a4ca

Please sign in to comment.