From 9db22e90c423a40dc2ad0c2ea10d31f2963d27a1 Mon Sep 17 00:00:00 2001 From: StudioWEngineers Date: Wed, 23 Oct 2024 19:50:01 +0100 Subject: [PATCH] fix compilation error --- src/bindings/bnd_extensions.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bindings/bnd_extensions.cpp b/src/bindings/bnd_extensions.cpp index 4eabac4a..2c71cf0d 100644 --- a/src/bindings/bnd_extensions.cpp +++ b/src/bindings/bnd_extensions.cpp @@ -699,8 +699,7 @@ BND_FileObject* BND_ONXModel_ObjectTable::ModelObjectAt(int index) #if defined(ON_PYTHON_COMPILE) if (index < 0) - int new_index = m_compref_cache.Count() + index; - index = new_index < 0 ? std::abs(new_index) : new_index; + index = m_compref_cache.Count() + index < 0 ? std::abs(index) : m_compref_cache.Count() + index; #endif if (index < m_compref_cache.Count())