]> git.sur5r.net Git - i3/i3/commit
Cast unsigned to signed before comparison
authorIngo Bürk <ingo.buerk@tngtech.com>
Thu, 3 Dec 2015 17:57:02 +0000 (18:57 +0100)
committerIngo Bürk <ingo.buerk@tngtech.com>
Thu, 3 Dec 2015 17:57:02 +0000 (18:57 +0100)
commit256007442f41cd9c461e62337d8d37bdf3407903
treede93ba74530e24573e47f13eaed35f30cf2c9e7c
parentc490a60d943627c8d07dcbf052e15acbf687f99b
Cast unsigned to signed before comparison

The values of a Rect are unsigned, but can contain signed values.
Using MAX when the value is negative causes incorrect behavior and
makes the result stay negative, which is what we wanted to avoid here
in the first place.

Fix by properly casting the value for the comparison.

fixes #2094
src/x.c