fix(library/match): index out of bounds

This commit is contained in:
Leonardo de Moura 2015-01-29 14:41:38 -08:00
parent b5d1f4e54c
commit e6f022e3f2

View file

@ -114,7 +114,7 @@ class match_fn : public match_context {
optional<level> _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];
}