Fixed some int - unsigned int problem for the case "combien < 0"

This commit is contained in:
evomarc 2004-12-27 07:31:59 +00:00
commit 8c36a1274b

View file

@ -127,9 +127,10 @@ public:
}
if (combien < 0)
{
if (_size+combien<0)
unsigned int combloc = -combien;
if (_size<combloc)
throw std::runtime_error("Negative result in eoHowMany");
return _size+combien;
return _size-combloc;
}
return unsigned(combien);
}