From 51c462301b93eccbce6b9ed67675c8d26b998a7d Mon Sep 17 00:00:00 2001
From: Daniil Rozanov <daniilrozzanov@gmail.com>
Date: Sat, 4 May 2024 01:41:56 +0300
Subject: fix: properly read for large number of targets in fileapi reply

---
 lua/cmake/project.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'lua/cmake/project.lua')

diff --git a/lua/cmake/project.lua b/lua/cmake/project.lua
index 5524fbd..0edbb02 100644
--- a/lua/cmake/project.lua
+++ b/lua/cmake/project.lua
@@ -174,7 +174,7 @@ end
 --- Set current build option by index
 --- @param idx number
 function Project.set_current_build_option(idx)
-	local _size = #Project[current_config].build_options
+	local _size = #configs[current_config].build_options
 	assert(not (idx < 1 or idx > _size), "Index is out of range. Index is " .. idx .. " for " .. _size .. "config(s)")
 	configs[current_config].current_build = idx
 end
-- 
cgit v1.2.3