Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
baetz-daniel committed Feb 24, 2021
1 parent cdb5c14 commit c0988c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Exomia.Framework/Game/RenderForm.InputDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,12 @@ public void Register(in TDelegate handler, int position = -1)
{
_list.Insert(position, handler);
}
else if (position < 0 && _list.Count + position >= 0)
else if (position < 0)
{
_list.Insert(_list.Count + position, handler);
_list.Insert(
_list.Count + position >= 0
? _list.Count + position
: 0, handler);
}
else
{
Expand Down

0 comments on commit c0988c2

Please sign in to comment.