* eoDetSelect: when the call of howmany() returns 0 it is replaced by 1

This commit is contained in:
Caner CANDAN 2010-08-18 17:30:11 +02:00
commit bb5b1965c7

View file

@ -55,6 +55,12 @@ class eoDetSelect : public eoSelect<EOT>
unsigned int pSize = _source.size();
size_t target = howMany(pSize);
if ( target == 0 )
{
eo::log << eo::warnings << "Call to a eoHowMany instance returns 0 (target=" << target << ") it will be replaced by 1 to continue." << std::endl;
target = 1;
}
_dest.resize(target);
unsigned remain = target % pSize;