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
Henning Geinitz 2000-11-10 21:56:46 +00:00
rodzic d59168e4dd
commit 4f0b378b80
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -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;