fix(furvm): change equals to not equals in function's position and native

This commit is contained in:
2026-06-11 15:09:00 +02:00
parent ba39f5ab27
commit 6ca5fcc995
+2 -2
View File
@@ -104,7 +104,7 @@ public:
* @return The value. * @return The value.
*/ */
std::size_t position() const { std::size_t position() const {
if (m_type == function_t::Normal) throw std::runtime_error("function type mismatch"); if (m_type != function_t::Normal) throw std::runtime_error("function type mismatch");
return m_value.position; return m_value.position;
} }
@@ -114,7 +114,7 @@ public:
* @return The value. * @return The value.
*/ */
const native_function& native() const { const native_function& native() const {
if (m_type == function_t::Native) throw std::runtime_error("function type mismatch"); if (m_type != function_t::Native) throw std::runtime_error("function type mismatch");
return m_value.native; return m_value.native;
} }
private: private: