Skip to content

Commit

Permalink
small change for buffer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SagnikDey92 committed Jul 31, 2019
1 parent 2c5e69c commit 8b96c9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/real/exact_number.hpp
Expand Up @@ -16,9 +16,9 @@ namespace boost {
struct exact_number {
using exponent_t = int;

std::vector<T> digits = {};
exponent_t exponent = 0;
static const int BASE = 10;
std::vector<T> digits = {};
bool positive = true;

static bool aligned_vectors_is_lower(const std::vector<T> &lhs, const std::vector<T> &rhs, bool equal = false) {
Expand Down Expand Up @@ -356,9 +356,9 @@ namespace boost {
++idx;
residual.erase(residual.begin(), residual.begin() + idx);
current_dividend = residual;
current_dividend.push_back(*next_digit);
if (flg)
break;
current_dividend.push_back(*next_digit);
++next_digit;
}
// TODO: once the stop criteria is improved, the integer part is not the whole number
Expand Down

0 comments on commit 8b96c9d

Please sign in to comment.