diff --git a/src/library/match.cpp b/src/library/match.cpp index ad6023e7b..f1472b9c0 100644 --- a/src/library/match.cpp +++ b/src/library/match.cpp @@ -114,7 +114,7 @@ class match_fn : public match_context { optional _get_subst(level const & x) const { unsigned i = to_meta_idx(x); - if (i > m_lsubst_sz) + if (i >= m_lsubst_sz) throw_exception(); return m_lsubst[i]; }