globalmousekeyhook icon indicating copy to clipboard operation
globalmousekeyhook copied to clipboard

Combination Equal problem

Open wojiuxuihuan opened this issue 1 year ago • 0 comments

The origon code as following, which will always get the wrong answer:

        protected bool Equals(Combination other)
        {
            return TriggerKey == other.TriggerKey && Chord.Equals(other.Chord);
        }

Add a pair of parentheses should fix:

        protected bool Equals(Combination other)
        {
            return (TriggerKey == other.TriggerKey) && Chord.Equals(other.Chord);
        }

wojiuxuihuan avatar Aug 08 '23 16:08 wojiuxuihuan