diff --git a/Source/OpenTK/Input/KeyboardState.cs b/Source/OpenTK/Input/KeyboardState.cs index 955ef547..91c019a8 100644 --- a/Source/OpenTK/Input/KeyboardState.cs +++ b/Source/OpenTK/Input/KeyboardState.cs @@ -122,8 +122,8 @@ namespace OpenTK.Input bool equal = true; unsafe { + int* k2 = other.Keys; fixed (int* k1 = Keys) - fixed (int* k2 = other.Keys) { for (int i = 0; equal && i < NumInts; i++) equal &= *(k1 + i) == *(k2 + i); diff --git a/Source/OpenTK/Input/MouseState.cs b/Source/OpenTK/Input/MouseState.cs index 937833df..e0b5b458 100644 --- a/Source/OpenTK/Input/MouseState.cs +++ b/Source/OpenTK/Input/MouseState.cs @@ -302,8 +302,8 @@ namespace OpenTK.Input bool equal = true; unsafe { + int* b2 = other.Buttons; fixed (int* b1 = Buttons) - fixed (int* b2 = other.Buttons) { for (int i = 0; equal && i < NumInts; i++) equal &= *(b1 + i) == *(b2 + i);