From 32169155bb92d8f1c4386237c4363055b2fa1430 Mon Sep 17 00:00:00 2001 From: uramer Date: Tue, 27 May 2025 11:56:16 +0000 Subject: [PATCH] Fix before insert index --- apps/openmw/mwlua/uibindings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwlua/uibindings.cpp b/apps/openmw/mwlua/uibindings.cpp index 33380b8ea3..bc5581eb74 100644 --- a/apps/openmw/mwlua/uibindings.cpp +++ b/apps/openmw/mwlua/uibindings.cpp @@ -182,7 +182,7 @@ namespace MWLua if (index == LuaUi::Layer::count()) throw std::logic_error( Misc::StringUtils::format("Couldn't insert before non-existent layer %s", beforeName)); - LuaUi::Layer::insert(index - 1, name, options); + LuaUi::Layer::insert(index, name, options); }, "Insert before UI layer"); };