Browse Source

bug fix: #2020

cl-refactor
yann300 10 years ago
parent
commit
86447d4a40
  1. 4
      mix/QBigInt.cpp

4
mix/QBigInt.cpp

@ -65,7 +65,9 @@ QVariantMap QBigInt::checkAgainst(QString const& _type) const
QString capacity = type.replace("uint", "").replace("int", "");
if (capacity.isEmpty())
capacity = "256";
bigint range = 256^(capacity.toInt() / 8);
bigint range = 1;
for (int k = 0; k < capacity.toInt() / 8; ++k)
range = range * 256;
bigint value = boost::get<bigint>(this->internalValue());
ret.insert("valid", true);
if (_type.startsWith("uint") && value > range - 1)

Loading…
Cancel
Save