diff --git a/src/lib/util/opresolv.h b/src/lib/util/opresolv.h index 3d919d26d59..f6a98bf444a 100644 --- a/src/lib/util/opresolv.h +++ b/src/lib/util/opresolv.h @@ -142,7 +142,7 @@ public: template option_guide_impl(T &&... elems) : std::array({ std::forward(elems)... }) - , option_guide(&(*this)[0], &(*this)[0] + Count) + , option_guide(Count > 0 ? &(*this)[0] : nullptr, Count > 0 ? &(*this)[0] + Count : nullptr) { } };