From 6ca5fcc995856b037d544009031349bea89a94d8 Mon Sep 17 00:00:00 2001 From: CHatingPython Date: Thu, 11 Jun 2026 15:09:00 +0200 Subject: [PATCH] fix(furvm): change equals to not equals in function's position and native --- furvm/include/furvm/function.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/furvm/include/furvm/function.hpp b/furvm/include/furvm/function.hpp index e8c84ac..0fe4165 100644 --- a/furvm/include/furvm/function.hpp +++ b/furvm/include/furvm/function.hpp @@ -104,7 +104,7 @@ public: * @return The value. */ 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; } @@ -114,7 +114,7 @@ public: * @return The value. */ 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; } private: