kopia lustrzana https://gitlab.com/sane-project/backends
2000-11-10 Henning Meier-Geinitz <hmg@gmx.de>
* sanei/sanei_constrain_value.c: If constraint_type is SANE_CONSTRAINT_RANGE and quantization is used, the results may be outside the limits of the range because quantization uses the orginal value. Fixed by doing quantization with the already checked value.DEVEL_2_0_BRANCH-1
rodzic
d59168e4dd
commit
4f0b378b80
|
@ -81,6 +81,8 @@ sanei_constrain_value (const SANE_Option_Descriptor * opt, void * value,
|
|||
}
|
||||
}
|
||||
|
||||
w = *(SANE_Word *) value;
|
||||
|
||||
if (range->quant)
|
||||
{
|
||||
v = (w - range->min + range->quant/2) / range->quant;
|
||||
|
|
Ładowanie…
Reference in New Issue