diff --git a/src/util/rlimit.cpp b/src/util/rlimit.cpp index 93e9d8d6cee..f71d2764a7c 100644 --- a/src/util/rlimit.cpp +++ b/src/util/rlimit.cpp @@ -53,7 +53,7 @@ bool reslimit::inc(unsigned offset) { } void reslimit::push(unsigned delta_limit) { - uint64_t new_limit = delta_limit + m_count; + uint64_t new_limit = delta_limit ? delta_limit + m_count : std::numeric_limits::max(); if (new_limit <= m_count) { new_limit = std::numeric_limits::max(); }