summaryrefslogtreecommitdiff
path: root/number.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'number.cpp')
-rw-r--r--number.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/number.cpp b/number.cpp
index acd60fd..bd05dbf 100644
--- a/number.cpp
+++ b/number.cpp
@@ -20,7 +20,7 @@ number::to_hex_string() const
/* If more operands are present, successive ones must be padded. */
ss << std::setfill('0');
- ss << std::setw(16);
+ ss << std::setw(8);
}
return ss.str();
@@ -71,10 +71,10 @@ number::operator+(const number &n) const
result._operands.push_back(n1 + n2 + (carry ? 1 : 0));
- if (carry && (n1 == UINT64_MAX)) {
+ if (carry && (n1 == UINT32_MAX)) {
carry = true;
} else {
- carry = ((UINT64_MAX - n1 - (carry ? 1 : 0)) < n2);
+ carry = ((UINT32_MAX - n1 - (carry ? 1 : 0)) < n2);
}
++it;