summaryrefslogtreecommitdiff
path: root/src/util/integer_cln_imp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/integer_cln_imp.h')
-rw-r--r--src/util/integer_cln_imp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/integer_cln_imp.h b/src/util/integer_cln_imp.h
index b7a35fee8..517e406ec 100644
--- a/src/util/integer_cln_imp.h
+++ b/src/util/integer_cln_imp.h
@@ -246,12 +246,14 @@ public:
//friend std::ostream& operator<<(std::ostream& os, const Integer& n);
long getLong() const {
+ // ensure there isn't overflow
Assert(d_value <= std::numeric_limits<long>::max());
Assert(d_value >= std::numeric_limits<long>::min());
return cln::cl_I_to_long(d_value);
}
unsigned long getUnsignedLong() const {
+ // ensure there isn't overflow
Assert(d_value <= std::numeric_limits<unsigned long>::max());
Assert(d_value >= std::numeric_limits<unsigned long>::min());
return cln::cl_I_to_ulong(d_value);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback