From 90d83fa2ad76b25d295e3005fc323762ab2c4164 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 19 May 2014 10:41:22 -0700 Subject: [PATCH] fix(kernel/environment): bug in get_extension Signed-off-by: Leonardo de Moura --- src/kernel/environment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/environment.cpp b/src/kernel/environment.cpp index f8be8950f..c2c336189 100644 --- a/src/kernel/environment.cpp +++ b/src/kernel/environment.cpp @@ -153,7 +153,7 @@ unsigned environment::register_extension(std::shared_ptr= get_extension_manager().has_ext(id)) throw_invalid_extension(*this); - if (id < m_extensions->size() || !(*m_extensions)[id]) + if (id >= m_extensions->size() || !(*m_extensions)[id]) return get_extension_manager().get_initial(id); return *((*m_extensions)[id].get()); }