1
0
mirror of https://github.com/deadw00d/AROS.git synced 2025-12-07 22:14:08 +00:00

Use correct bounds when clamping result of MUIM_Numeric_ValueToScale(Ext)

with MUIA_Numeric_Reverse set. Previously, the bounds were inverted, leading 
to the clamped value always being zero.


git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@46515 fb15a70f-31f2-0310-bbcc-cdcc74a49acc
This commit is contained in:
neil
2013-02-05 16:15:36 +00:00
parent 4b066d78a6
commit 24afc5b80a

View File

@ -1,5 +1,5 @@
/*
Copyright <20> 2002-2006, The AROS Development Team. All rights reserved.
Copyright <20> 2002-2013, The AROS Development Team. All rights reserved.
$Id$
*/
@ -485,7 +485,7 @@ IPTR Numeric__MUIM_ValueToScale(struct IClass *cl, Object *obj,
val = min;
}
val = CLAMP(val, min, max);
val = CLAMP(val, msg->scalemin, msg->scalemax);
return val;
}
@ -516,13 +516,13 @@ IPTR Numeric__MUIM_ValueToScaleExt(struct IClass *cl, Object *obj,
scale = min;
}
scale = CLAMP(scale, min, max);
scale = CLAMP(scale, msg->scalemin, msg->scalemax);
return scale;
}
/**************************************************************************
MUIM_Export - to export an objects "contents" to a dataspace object.
MUIM_Export - to export an object's "contents" to a dataspace object.
**************************************************************************/
IPTR Numeric__MUIM_Export(struct IClass *cl, Object *obj,
struct MUIP_Export *msg)