summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-04-30 11:29:03 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-04-30 11:29:03 +0930
commit00acb40f2bc5bb4a1977b9b08db75630677ff787 (patch)
tree44d350bb0197354364da0015ceb35b7d2d376901 /dix
parent18b33dd4ff46f63bad70b493b1d0b0758c961ada (diff)
dix: fix typo in clipAxis.
Check needs to be (min_axis < max_axis), not (min_axis < min_axis)
Diffstat (limited to 'dix')
-rw-r--r--dix/getevents.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index 0a44a809f..e9c1db0f5 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -358,8 +358,9 @@ clipAxis(DeviceIntPtr pDev, int axisNum, int *val)
{
AxisInfoPtr axes = pDev->valuator->axes + axisNum;
- /* No clipping if the value-range <= 0 */
- if(axes->min_value < axes->min_value) {
+ /* Don't clip if min_value and max_value are the same, or if an invalid
+ range is specified. */
+ if(axes->min_value < axes->max_value) {
if (*val < axes->min_value)
*val = axes->min_value;
if (*val > axes->max_value)