Fix offset computation in BigInteger::operator<<

This commit is contained in:
abolz 2018-06-16 09:41:04 +02:00
parent 8b98f4a782
commit 879ae853fe

View File

@ -133,7 +133,7 @@ public:
RAPIDJSON_ASSERT(count_ + offset <= kCapacity); RAPIDJSON_ASSERT(count_ + offset <= kCapacity);
if (interShift == 0) { if (interShift == 0) {
std::memmove(&digits_[count_ - 1 + offset], &digits_[count_ - 1], count_ * sizeof(Type)); std::memmove(digits_ + offset, digits_, count_ * sizeof(Type));
count_ += offset; count_ += offset;
} }
else { else {